User:Muskit Gergous/Script installation instructions: Difference between revisions

From Bharatpedia, an open encyclopedia
(Created page with "==How to install== {{#if:{{{warnmobile|{{{mobileonly|}}}}}}|Do not use script-installer! Script-installer uses importScript() which is unavailable on mobile.}} Add this to m:Special:MyPage/global.js to load the script globally: <code> {{#if:{{{mobileonly|}}}|if ( mw.config.get('skin') == 'minerva' ) {}}mw.loader.load('//en.wikipedia.org/w/index.php?title={{urlencode:{{FULLPAGENAME}}.js|WIKI}}&action=raw&ctype=text/javascript');{{#if:{{{mobileonly|}}}|<nowiki>}</nowi...")
(No difference)

Revision as of 19:12, 15 October 2024

How to install

Add this to m:Special:MyPage/global.js to load the script globally:

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Muskit_Gergous/Script_installation_instructions.js&action=raw&ctype=text/javascript');

To load the script on a specific Wikimedia project, add the line to Special:MyPage/common.js on the project in question instead.