User:Dispenser/Link checker/toolbox.js

From Wikipedia, the free encyclopedia

Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.

/* [[User:Dispenser/Link checker]] Toolbox entry
 * Adds a entry in the Toolbox that will check the external links of the page in the Monobook skin
 * 
 * == Installing ==
 * Copy the line below and paste it into the bottom of your monobook.js file ([[Special:Mypage/monobook.js]])
 
        importScript('User:Dispenser/Link checker/toolbox.js');
 
 * Save the page and CTRL-SHIFT-F5 (Refresh)
 */
function checklinks(){
    addPortletLink('p-tb', 'http://tools.wikimedia.de/~dispenser/cgi-bin/webchecklinks.py?page='+wgPageName, 'Check external links', 't-checklinks');
    }
if(wgIsArticle){
    if(doneOnloadHook)checklinks(); //if imported dynamically
    else addOnloadHook(checklinks);
    }