User:Testaccount245/monobook.js

function rangecheck { if (document.URL.indexOf('Contributions/') != -1) { var target = document.URL.substring(document.URL.indexOf('Contributions/')+14); } else { var target = document.URL.substring(document.URL.indexOf('&target=')+8,document.URL.indexOf('&namespace=')); } if (wgPageName == "Special:Contributions" && /\d+\.\d+\.\d+\.\d+/.test(target)) { mw.util.addPortletLink('p-cactions', 'javascript:rangecheckclick', "check range", "ca-rangecheck", "See contribs from a range of IP's"); } } function rangecheckclick { var range = prompt("Range to check (form: 209, 209.209, 209.209.209):",""); if (range) { window.open("http://tools.wikimedia.de/~vvv/rangecontribs.php?user=" + range + "&wiki=enwiki_p", "Range COntributions"); } } $(rangecheck);