Jump to content

User:Dispenser/Link checker/toolbox.js

From Wikipedia, the free encyclopedia
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
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);
    }