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); alert(pagesToFix); if(nextLink !== null && limit === ""){ limit = document.location.href.substr(document.location.href.search("limit=")+6); }	if(nextLink !== null && !$.isNumeric(limit)){ pagesToFix = 100; }	else if(nextLink !== null && !$.isNumeric(pagesToFix)){ pagesToFix = -1; } var TRON = confirm("Process the switch command with the following values:\n\tnextLink: " + nextLink + "\n\tlimit: " + limit + "\n\tpagesToFix: " + pagesToFix); if(TRON){ 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; } }// TRON close }