User:Muskit Gergous/Script installation instructions

< User:Muskit Gergous
Revision as of 19:12, 15 October 2024 by Muskit Gergous (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.