Jump to content

User:Colin M/scripts/JWB with search.js/load.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/** This script contains the code required for loading [[User:Joeytje50/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/Script2"), "JS Wiki Browser w search", "tb-awbscript", "Run Javascript Wiki Browser");
});

if (mw.config.get('wgCanonicalNamespace')+':'+mw.config.get('wgTitle') === 'Project:AutoWikiBrowser/Script2' && mw.config.get('wgAction') == 'view')
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Colin_M/scripts/JWB_with_search.js&action=raw&ctype=text/javascript');