load.js"
From Documentation
(Created page with "→* This script contains the code required for loading [[MediaWiki/JWB.js]]. * All other code is located at that page.: //Idea by User:Epicgenius $.when(mw.loader.us...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 9: | Line 9: | ||
if (mw.config.get('wgCanonicalNamespace')+':'+mw.config.get('wgTitle') === 'Project:AutoWikiBrowser/Script' && mw.config.get('wgAction') == 'view') | if (mw.config.get('wgCanonicalNamespace')+':'+mw.config.get('wgTitle') === 'Project:AutoWikiBrowser/Script' && mw.config.get('wgAction') == 'view') | ||
− | mw.loader.load('// | + | mw.loader.load('//www.zkoss.org/wiki/MediaWiki:JWB.js?action=raw&ctype=text/javascript'); |
Latest revision as of 06:18, 29 June 2021
/** This script contains the code required for loading [[MediaWiki/JWB.js]].
* All other code is located at that page.
*/
//Idea by [[User:Epicgenius]]
$.when(mw.loader.using(['mediawiki.util'], $.ready)).done( function() {
mw.util.addPortletLink("p-tb", mw.config.get('wgArticlePath').replace('$1', "Project:AutoWikiBrowser/Script"), "JS Wiki Browser", "tb-awbscript", "Run Javascript Wiki Browser");
});
if (mw.config.get('wgCanonicalNamespace')+':'+mw.config.get('wgTitle') === 'Project:AutoWikiBrowser/Script' && mw.config.get('wgAction') == 'view')
mw.loader.load('//www.zkoss.org/wiki/MediaWiki:JWB.js?action=raw&ctype=text/javascript');