Cannabis Indica

/* This script adds an "[[DNSBL|RBL]] check" link to the toolbox on IP user/talk/contribs pages.

<strong style="color: red;">Important:</strong> Some care is required in interpreting the results of this tool.  In particular, some of the RBLs shown on the results page are lists of dial-up and/or broadband user IPs, and will thus include the IPs of ''most legitimate Wikipedia editors''.  Others are combined lists that may or may not include dial-up and broadband addresses.  Being listed on such RBLs does '''not''' mean the IP is an [[WP:OP|open proxy]].  In general, before blocking or reporting an IP as a proxy based on an RBL listing, make sure you carefully read the listing criteria for the matching RBLs first.

<pre><nowiki>*/

addOnloadHook(function () {
    var addr;
    if (mw.config.get('wgCanonicalNamespace') == "Special" && mw.config.get('wgCanonicalSpecialPageName') == "Contributions")
        addr = document.forms[0].target.value;
    else if (mw.config.get('wgCanonicalNamespace') == "User" || mw.config.get('wgCanonicalNamespace') == "User_talk")
        addr = mw.config.get('wgTitle');

    if (!/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/.test(addr)) return;  // not an IP

    addPortletLink('p-tb', 'http://www.robtex.com/rbls/'+addr+'.html',
                   'RBL check', 't-rblcheck', 'Multi-RBL check');
});

// </nowiki></pre>

Leave a Reply