User:Dispenser/Link checker/toolbox.js

Source: Wikipedia, the free encyclopedia.
<
Link checker
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.
/** Checklinks toolbox item ***************************************************
 * 
 *  Description: Adds an item in toolbox portlet that runs the checklinks tool 
 *               on the viewed page.
 *  Maintainers: [[User:Dispenser]]
 *  Installation: Copy and paste following code into you /monobook.js
 *  <nowiki>         {{subst:js|User:Dispenser/Link checker/toolbox.js}}
 *  </nowiki>
 */
function checklinks(){
    mw.util.addPortletLink('p-tb', 'http://toolserver.org/~dispenser/cgi-bin/webchecklinks.py?page=' + mw.config.get('wgContentLanguage') + ':' + mw.config.get('wgPageName'), 'Check external links', 't-checklinks');
    }
if(mw.config.get('wgIsArticle')){
    addOnloadHook(checklinks);
    }