Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
6a8fb8fe
Commit
6a8fb8fe
authored
Dec 28, 2015
by
Marcel Stör
Browse files
Fix fly-out menu content and add temporary debugger
parent
046ad545
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/js/extra.js
View file @
6a8fb8fe
...
...
@@ -8,6 +8,11 @@ var nodemcu = nodemcu || {};
$
(
document
).
ready
(
function
()
{
hideNavigationForAllButSelectedLanguage
();
addLanguageSelectorToRtdFlyOutMenu
();
document
.
addEventListener
(
"
DOMSubtreeModified
"
,
function
(
e
)
{
// Notify of change!
debugger
;
console
.
warn
(
"
change!
"
,
e
);
},
false
);
});
function
hideNavigationForAllButSelectedLanguage
()
{
...
...
@@ -55,10 +60,11 @@ var nodemcu = nodemcu || {};
}
function
createLanguageLinkFor
(
languageCode
,
isCurrentlySelected
)
{
var
strong
;
// split[0] is an '' because the path starts with the separator
var
pathSegments
=
window
.
location
.
pathname
.
split
(
'
/
'
);
var
dd
=
document
.
createElement
(
"
dd
"
);
var
href
=
document
.
createElement
(
"
href
"
);
href
.
setAttribute
(
'
a
'
,
'
/
'
+
pathSegments
[
0
]
+
'
/
'
+
pathSegments
[
1
]
+
'
/
'
+
languageCode
);
var
href
=
document
.
createElement
(
"
a
"
);
href
.
setAttribute
(
'
href
'
,
'
/
'
+
pathSegments
[
1
]
+
'
/
'
+
pathSegments
[
2
]
+
'
/
'
+
languageCode
);
href
.
appendChild
(
document
.
createTextNode
(
languageCode
));
dd
.
appendChild
(
href
);
if
(
isCurrentlySelected
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment