MediaWiki:Common.js: Difference between revisions
From The Fifth City Wiki
enable discord js |
remove unused js |
||
Line 9: | Line 9: | ||
mw.loader.load( '/w/index.php?title=' + encodeURIComponent( pageName ) + '&action=raw&ctype=text/css', 'text/css' ); | mw.loader.load( '/w/index.php?title=' + encodeURIComponent( pageName ) + '&action=raw&ctype=text/css', 'text/css' ); | ||
}; | }; | ||
Latest revision as of 02:53, 23 June 2025
/* Any JavaScript here will be loaded for all users on every page load. */ // Helper functions importScript = function(pageName) { mw.loader.load( '/w/index.php?title=' + encodeURIComponent( pageName ) + '&action=raw&ctype=text/javascript' ); }; importStylesheet = function(pageName) { mw.loader.load( '/w/index.php?title=' + encodeURIComponent( pageName ) + '&action=raw&ctype=text/css', 'text/css' ); };