User:Renamed user VYTYPCKEXW/vector.js

importScript('User:Krimpet/CH2.js'); importScript('User:AzaToth/twinkle.js'); importScript('User:The_Earwig/afc-helper.js'); // AfC Redirect Helper script. importScript("User:Lupin/recent2.js");

if( typeof( TwinkleConfig ) == 'undefined' ) TwinkleConfig = {}; // DO NOT REMOVE THIS LINE - ALL TWINKLE SETTINGS AFTER THIS TwinkleConfig.batchdeleteChunks				=	50; TwinkleConfig.batchDeleteMinCutOff			=	5; TwinkleConfig.batchMax					=	5000; TwinkleConfig.batchProtectChunks			=	50; TwinkleConfig.batchProtectMinCutOff			=	5; TwinkleConfig.batchundeleteChunks			=	50; TwinkleConfig.batchUndeleteMinCutOff			=	5; TwinkleConfig.blankTalkpageOnIndefBlock			=	false; TwinkleConfig.defaultWarningGroup			=	1; TwinkleConfig.deleteTalkPageOnDelete			=	false; TwinkleConfig.deletionSummaryAd				=	' using	Twinkle'; TwinkleConfig.deliChunks				=	500; TwinkleConfig.deliMax					=	5000; TwinkleConfig.markAIVReportAsMinor			=	true; TwinkleConfig.markSockReportAsMinor			=	true; TwinkleConfig.markUAAReportAsMinor			=	true; TwinkleConfig.markRevertedPagesAsMinor			=	[ 'vand' ]; TwinkleConfig.markSpeedyPagesAsMinor			=	false; TwinkleConfig.markSpeedyPagesAsPatrolled		=	true; TwinkleConfig.notifyUserOnDeli				=	true; TwinkleConfig.notifyUserOnSpeedyDeletionNomination	=	[ 'g1',	'g2', 'g3', 'g4', 'g10', 'g11',	'g12', 'a1', 'a2', 'a3', 'a5', 'a7', 'a9', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f9', 'f10', 'f11', 'u3', 't2', 't3', 'p2'	]; TwinkleConfig.offerReasonOnNormalRevert			=	true; TwinkleConfig.openTalkPage				=	[ 'agf', 'norm', 'vand'	]; TwinkleConfig.openTalkPageOnAutoRevert			=	false; TwinkleConfig.openUserTalkPageOnSpeedyDelete		=	[ 'g1',	'g2', 'g3', 'g4', 'g5',	'g10', 'g11', 'g12', 'a1', 'a3', 'a7', 'a9', 'f3', 'f4', 'f5', 'f6', 'f7', 'f9', 'f11', 'u3', 't2' ]; TwinkleConfig.orphanBacklinksOnSpeedyDelete		=	{exclude:['g6'], orphan:true}; TwinkleConfig.proddeleteChunks				=	50; TwinkleConfig.protectionSummaryAd			=	' using	Twinkle'; TwinkleConfig.revertMaxRevisions			=	50; TwinkleConfig.showRollbackLinks				=	[ 'diff', 'others' ]; TwinkleConfig.showSharedIPNotice			=	false; TwinkleConfig.summaryAd					=	' using	Twinkle'; TwinkleConfig.unlinkNamespaces				=	[ 0, 100 ]; TwinkleConfig.userTalkPageMode				=	'window'; TwinkleConfig.watchProdPages				=	true; TwinkleConfig.watchRevertedPages			=	[]; TwinkleConfig.watchSpeedyPages				=	[]; TwinkleConfig.watchWarnings				=	false; TwinkleConfig.welcomeUserOnSpeedyDeletionNotification	=	TwinkleConfig.notifyUserOnSpeedyDeletionNomination; var usergroups = { "originalName" : function(name) { //Finds the original name of a user in the event of a detected rename var req = sajax_init_object; req.open("GET", wgScript + "?title=Category:Redirects_to_requests_for_adminship&from=" + encodeURIComponent(name), false); req.send(null); var content = req.responseText.split("")[1].split(" ")[0]; if(content.indexOf(name) != -1) { var redirect = content.substring(content.indexOf(name)-33).split("\"")[0];           var req2 = sajax_init_object;            req2.open("GET", wgScript + "?title=" + encodeURIComponent(redirect) + "&action=edit", false);            req2.send(null);            var content2 = req2.responseText.split("bodyContent")[1].split("visualClear")[0];            return content2.split(/\#[rR][eE][dD][iI][rR][eE][cC][tT] ?\[\[/)[1].split("]]")[0].split("/")[1]; //The original name            delete req2;        } else {            return false;        }        delete req;    },    "findRFA" : function(user_) {        var user = this.originalName(user_) || user_; //If there is a rename, use the original name; else, use the name provided.        var req = sajax_init_object;        req.open("GET", wgScript + "?title=Category:Successful_requests_for_adminship&from=" + encodeURIComponent(user), false); req.send(null); with(req.responseText.split("")[1].split(" ")[0]) { if(indexOf(user) == -1) { jsMsg("RfA was missing from Category:Successful requests for adminship or Category:Redirects to requests for adminship"); } else { location.href = "/wiki/" + substring(indexOf(user)-33).split("\"")[0]; //Why 33? "Wikipedia:Requests for adminship/" is 33 characters long.           }        }        delete req;    },    "link" : function (link) {        switch(link) {            case "accountcreator": return "User_access_levels#Accountcreator";                break;            case "rollbacker"    : return "Rollback_feature";                break;            case "ipblock-exempt": return "User_access_levels#Ipblock-exempt";                break;            case "sysop"         : return "Administrators";                break;            case "oversight"     : return "Oversight";                break;            case "checkuser"     : return "CheckUser";                break;            case "bot"           : return "Bots";                break;            case "bureaucrat"    : return "Bureaucrats";                break; case "abusefilter"  : return "Edit_filter"; break; default             : return "User_access_levels"; }   },    "download" : function { var req = sajax_init_object; req.open("GET", wgScriptPath + "/api.php?action=query&list=allusers&auprop=groups&aulimit=1&format=json&aufrom=" + encodeURIComponent(wgTitle), false); req.send(null); var data = eval("(" + req.responseText + ")").query.allusers[0]; if(data) { if(data.groups) { document.getElementById("contentSub").innerHTML += " " + wgTitle + " is " + (data.groups[0].substring(0, 1).search(/[aeiou]/) != -1 ? "an " : "a ") + ""; //Is the first letter of the first usergroup a vowel? If so, use "an"; if not, use "a." for(i=0; i<20; i++) { //Why 20? 20 is a high number. if(data.groups[i]) { document.getElementById("contentSub").innerHTML += "" + data.groups[i] + "" + (data.groups[i] == "sysop" ? " (rfa''')" : "") + (!data.groups[i+1] ? "." : (data.groups.length == 2 ? " and " : ", " + (!data.groups[i+2] ? "and " : ""))) + "'''"; } else { break; }               }            } else { document.getElementById("contentSub").innerHTML += " " + wgTitle + " is not in any special user groups."; }       }    } }; $(function {    if((wgNamespaceNumber == 2 || wgNamespaceNumber == 3) && wgPageName.indexOf("/") == -1) {        importStylesheet("User:Animum/usergroups.css");        mw.util.addPortletLink("p-cactions", "javascript:usergroups.download", "$", "ca-usergroups");    } }); //Check if users are blocked. importScript('User:NuclearWarfare/Mark-blocked script.js');

//removespam.js function dorem_spam { var tag = query_get('remspam'); var box = document.getElementById('wpTextbox1'); var txt = box.value; var reg = tag.replace('http://', '').replace(/\./g, '\\.').replace(/\*\\?\./g, '(?:.*?\\.)?'); var newtext = ''+txt; //		var elreg = /.*\s*={1,6}external\s*links?={1,6}\s*.*/ig; //		var elreg2 = /(\s*={1,6}external\s*links?={1,6}.*)$/ //		if(elreg.test(newtext)) { //						alert('MATCHED'); //			var elsect = newtext.replace(elreg, '$1'); //						document.getElementById('content').appendChild(document.createTextNode(elreg)); //						document.getElementById('content').appendChild(document.createElement('br')); //						document.getElementById('content').appendChild(document.createTextNode(elsect)); //						fuu; //			elsect = elsect.replace(new RegExp('^\\s*\\*.*?\\[?https?\\://'+reg+'/?.+?(?:\\s+(.+?)\\]|(\\s)).*?$', 'igm'), ''); //			newtext = newtext.replace(elreg, elsect); //		}		if(!query_get('options') || (',' + query_get('options') + ',').indexOf(',lines,') != -1) newtext = newtext.replace(new RegExp('^\\s*\\*.*?\\[?https?\\://'+reg+'/?.+?(?:\\s+(.+?)\\]|.*?)$', 'igm'), ''); if(!query_get('options') || (',' + query_get('options') + ',').indexOf(',citeweb,') != -1) newtext = newtext.replace(new RegExp('(?:\\s*)?\\{\\{\\s*cite[_ ]web\\s*\\|(?:.*?\\|)*\\s*url\\s*=\\s*https?\\://'+reg+'/?.*?\\s*(?:\\|.*?)?\\}\\}(?:\\s*<\/ref>)?', 'ig'), ''); if(!query_get('options') || (',' + query_get('options') + ',').indexOf(',inline,') != -1) newtext = newtext.replace(new RegExp('(?:\\s*)?\\[?https?\\://'+reg+'/?.+?(?:\\s+(.+?)\\]|(\\s))(?:\\s*<\/ref>)?', 'ig'), '$1'); box.value = newtext; document.getElementById('wpSummary').value = query_get('usesummary').replace(/__LINK__/g, tag) || 'Removing external link: '+tag+' per m:Talk:Spam_blacklist'; document.getElementById('wpMinoredit').checked = true; document.getElementById('wpWatchthis').checked = false; document.getElementById('wpDiff').click; } function rem_spam { var targ = query_get('target') || unescape(location.href).split('/').reverse[0].split('?')[0].split('#')[0]; var tag = prompt('Please insert a link (without http://) to remove from\nall pages listed here. Example (and default if textbox is blank):\n'+targ); if(tag == null) { alert('Action canceled.'); return; } if(tag == "") tag = targ; var options = prompt('Please enter the option modes you would want.\nEnter each one in the textbox (without any seperation marker)\ne=Remove lines of External Links that contain the link\ni=Remove links inline in text\nc=Remove Cite_web templates using the link\nExample: ci\nLeave the box blank for all modes'); if(options == null) { alert('Action canceled.'); return; } if(options == "") options = 'eic'; options = options.split(new RegExp('')); var opt = ''; for(var x in options) { var y = options[x]; if(y == 'c') opt += ',citeweb'; if(y == 'i') opt += ',inline'; if(y == 'e') opt += ',lines'; }	opt = opt.substring(1); options = opt; var usesummary = prompt('Please enter a summary to use\nDefault: Removing external link: __LINK__ per m:Talk:Spam blacklist'); if(usesummary == null) { alert('Action canceled.'); return; } if(usesummary == '') usesummary = 'Removing external link: __LINK__ -- per m:Talk:Spam blacklist'; var links = document.getElementById('bodyContent').getElementsByTagName('a'); for(var i=0; i]+)>)/g, ''); }	var btn = document.getElementById('ca-remspam').firstChild; btn.href = 'javascript:unrem_spam;'; btn.innerHTML = 'un-highlight links'; btn.title = ''; } function unrem_spam { var links = document.getElementById('bodyContent').getElementsByTagName('a'); for(var i=0; i<links.length; i++) { var link = links[i]; link.href = link.href.split('linkmodified=yes')[0]; link.style.color = ""; }	alert('All links will now be safe to click...'); var btn = document.getElementById('ca-remspam').firstChild; btn.href = 'javascript:rem_spam;'; btn.innerHTML = 'remove external links'; btn.title = ''; } function filter_main { var lis = document.getElementById('bodyContent').getElementsByTagName('li'); var len = lis.length; for(var i=0; i<len; i++) { var li = lis[i]; if(li.getElementsByTagName('a')[1].innerHTML.indexOf(':') != -1) { //li.parentNode.removeChild(li); li.style.display = 'none'; }	} } function addfilter_main { mw.util.addPortletLink('p-cactions', "javascript:filter_main", "filter links", 'ca-filter', 'Filter all pages on here to only be for mainspace'); } function addrem_spam { mw.util.addPortletLink('p-cactions', "javascript:rem_spam", "remove external links", 'ca-remspam', 'Alter all the links on this page to autorem the external link on the page when clicked'); } if(location.href.indexOf('action=edit') != -1 && location.href.indexOf('remspam=') != -1) addOnloadHook(dorem_spam); if(wgCanonicalSpecialPageName == "LinkSearch") { addOnloadHook(addrem_spam); addOnloadHook(addfilter_main); } //parse paramName out of query string //stolen from Lupin's popups function query_get(paramName) { var cmdRe=RegExp('[&?]'+paramName+'=([^&]*)'); var h=document.location; var m;	if (m=cmdRe.exec(h)) { try { return unescape(m[1]); }	catch (someError) {} }	return null; }