mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-09-24 10:48:46 +00:00
Attempt to convert to ES5
This commit is contained in:
commit
f6d0b61406
|
@ -22,7 +22,8 @@ function SmoothScroll() {
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
function ScrollSpy() {
|
||||
var sections = document.querySelectorAll(".mw-headline");
|
||||
window.addEventListener("scroll", function() {
|
||||
|
@ -49,13 +50,14 @@ function ScrollSpy() {
|
|||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
function CheckToC() {
|
||||
if (document.getElementById("toc")) {
|
||||
SmoothScroll();
|
||||
ScrollSpy();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (document.readyState !== "loading") {
|
||||
CheckToC();
|
||||
|
|
Loading…
Reference in a new issue