User:Technical 13/vector.js

/* Special:DoubleRedirects project */ if(mw.config.get("wgCanonicalSpecialPageName") === "DoubleRedirects"){ var nextLink = $(".mw-nextlink").html; var limit = document.location.href.slice(document.location.href.search("limit=")+6, document.location.href.search("&")); var pagesToFix = document.location.href.substr(document.location.href.search("pagesToFix=") +11); if(limit === ""){ limit = document.location.href.substr(document.location.href.search("limit=")+6); }	if(!$.isNumeric(limit)){ pagesToFix = 100; } else if(!$.isNumeric(pagesToFix)){ pagesToFix = -1; } var TRON = confirm("Process the switch command with the following values:\n\tnextLink: " + nextLink + "\n\tlimit: " + limit + "\n\tpagesToFix: " + pagesToFix); switch(pagesToFix){ case 100: setTimeout(function{location = '?limit=100&pagesToFix=250'},1); break; case 250: setTimeout(function{location = '?limit=250&pagesToFix=500'},1); break; case 500: setTimeout(function{location = '?limit=500&pagesToFix=1000'},1); break; case 1000: setTimeout(function{location = '?limit=1000&pagesToFix=-1'},1); break; case -1: setTimeout(function{location = '?limit=' + limit},1); break; default: break; } }