MediaWiki:Common.js: Difference between revisions

From Galaxypedia
No edit summary
(oops)
Line 7: Line 7:


// Sitenotice
// Sitenotice
var sitenotice = document.querySelector('#siteNotice mw-dismissable-notice');
var sitenotice = document.querySelector('#siteNotice .mw-dismissable-notice');
if (!sitenotice) sitenotice = document.querySelector('#siteNotice');
if (!sitenotice) sitenotice = document.querySelector('#siteNotice');
if (sitenotice) {
if (sitenotice) {
sitenotice.classList.add('sitenoticestyling');
sitenotice.classList.add('sitenoticestyling');
}
}

Revision as of 02:31, 3 September 2022

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

//Note that while loading content, appending "/wiki" or "/w" before the "/index..." statement may cause 404 errors or mime type mismatch errors (403)

//Import the Navbox.js scripts for the navbox price/name sorting functionality
mw.loader.load( '/index.php?title=MediaWiki:Navbox.js&action=raw&ctype=text/javascript' );

// Sitenotice
var sitenotice = document.querySelector('#siteNotice .mw-dismissable-notice');
if (!sitenotice) sitenotice = document.querySelector('#siteNotice');
if (sitenotice) {
	sitenotice.classList.add('sitenoticestyling');
}