MediaWiki:Common.js: Difference between revisions

From The Fifth City Wiki
KestrelGirl (talk | contribs)
Never mind lol
remove unused js
 
(One intermediate revision by the same user not shown)
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. */
// 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' );
};

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