MediaWiki:Common.js: Difference between revisions
Appearance
Created page with "→Any JavaScript here will be loaded for all users on every page load.: importScript('MediaWiki:DynamicNav.js');" |
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. */ | ||
function importPage(name, type) { | |||
return mw.loader.load( '/index.php?title=' + name + '&action=raw&ctype=' + type, type ); | |||
} | |||
function importScript(name) { return importPage(name, 'text/javascript'); } | |||
importScript('MediaWiki:DynamicNav.js'); | importScript('MediaWiki:DynamicNav.js'); | ||
Revision as of 10:04, 21 February 2023
/* Any JavaScript here will be loaded for all users on every page load. */
function importPage(name, type) {
return mw.loader.load( '/index.php?title=' + name + '&action=raw&ctype=' + type, type );
}
function importScript(name) { return importPage(name, 'text/javascript'); }
importScript('MediaWiki:DynamicNav.js');