Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
(Created page with "→Any JavaScript here will be loaded for all users on every page load.: console.log('test')") |
(Added potential BackToTop visibility function) |
||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
− | console.log( | + | |
+ | const backToTop = document.getElementById("BackToTop"); | ||
+ | if(backToTop) { | ||
+ | backToTop.addEventListener("wheel", e => { | ||
+ | console.log(backToTop); | ||
+ | }); | ||
+ | } |
Revision as of 23:34, 28 August 2020
/* Any JavaScript here will be loaded for all users on every page load. */
const backToTop = document.getElementById("BackToTop");
if(backToTop) {
backToTop.addEventListener("wheel", e => {
console.log(backToTop);
});
}