Wikipedia:WikiProject User scripts/Scripts/RBL check

From Wikipedia, the free encyclopedia
Jump to: navigation, search

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

Important: 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 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.


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

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

    addPortletLink('p-tb', ''+addr+'.html',
                   'RBL check', 't-rblcheck', 'Multi-RBL check');