Jump to content

MediaWiki:Common.js: Difference between revisions

From Cult of Flight Wiki
No edit summary
Tag: Manual revert
No edit summary
 
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. */
if (!mw.config.get('wgUserName')) {
const observer = new MutationObserver((mutationsList, observer) => {
for (const mutation of mutationsList) {
if (mutation.target.classList.contains('vector-animations-ready')) {
document.querySelector( '[data-event-name="pinnable-header.vector-main-menu.pin"]' ).click()
observer.disconnect();
break;
}
}
});
observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });
}

Latest revision as of 07:29, 2 April 2026

/* Any JavaScript here will be loaded for all users on every page load. */