MediaWiki:Common.js: Difference between revisions

From Celeste Wiki
no edit summary
(try reducing errors by checking for button presence)
No edit summary
Line 92:
} );*/
 
// (test) Replaces image
 
if (document.getElementById('replaceImageButton')) {
Line 106:
});
}
 
// Default scroll position for maps
window.addEventListener("load", function() {
const bottom = ["scroll0", "scroll1", "scroll2", "scroll4", "scroll7", "scroll8"]; // ids of maps where we need to push the scrollbar to bottom
bottom.forEach((id) => {
if (document.getElementById(id)) {
// document.getElementById(id).scrollTop = document.getElementById(id).scrollHeight;
document.getElementById(id).scrollTop = 999999;
}
});
});
2,559

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.