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...")
 
m (Cleanup)
 
Line 4: Line 4:


<code>
<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>}</nowiki>}}</code>
{{#if:{{{mobileonly|}}}|if ( mw.config.get('skin') == 'minerva' ) {}}mw.loader.load('//en.bharatpedia.org/w/index.php?title={{urlencode:{{FULLPAGENAME}}.js|WIKI}}&action=raw&ctype=text/javascript');{{#if:{{{mobileonly|}}}|<nowiki>}</nowiki>}}</code>


To load the script on a specific Wikimedia project, add the line to [[Special:MyPage/{{#if:{{{mobileonly|}}}|minerva|common}}.js]] on the project in question instead.
To load the script on a specific Bharatmedia project, add the line to [[Special:MyPage/{{#if:{{{mobileonly|}}}|minerva|common}}.js]] on the project in question instead.

Latest revision as of 19:12, 15 October 2024

How to install[edit]

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

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

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