Jump to content

MediaWiki:Common.js: Difference between revisions

From Cult of Flight Wiki
Blanked the page
Tags: Blanking Reverted
No edit summary
Tag: Manual revert
Line 1: Line 1:
 
/* 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'] });
}

Revision as of 07:15, 2 April 2026

/* 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'] });
}