User:Blueskiesdry/common.js

if (mw.config.get('wgTitle') === mw.config.get('wgUserName') && mw.config.get('wgNamespaceNumber') === 2) { var pageName = 'Edit_stats'; var subPages = 'true'; mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript'); } // Backlink: User:Kanegasi/editcounter function closePeerReview {	mw.loader.using("mediawiki.api").done( function 	{		$("#ca-closepeer>a").text("Closing...");		$("#ca-closepeer").off("click");		var talkPage = $("a:contains('Article talk')").attr("href");		var talkPageName = "";		if(talkPage != null)		{			talkPage = talkPage.match(/\/wiki\/(\w+:.+)/);			if(talkPage != null)			{				talkPageName = talkPage[1];			}		}		var api = new mw.Api;		api.edit(mw.config.get("wgPageName"), function(revision) {			var regexResult = revision.content.match(/\{\{ *[pP]eer review page *\| *topic *= *\w+ *\}\}/); if(regexResult != null) {				return { text: revision.content.replace(regexResult[0], ""), summary: "Closing peer review due to inactivity (via peerReviewCloser.js)" };			}			else {				mw.notify( 'Error updating the Peer Review page; article talk page might also require cleanup.', { title: 'Peer review closing error' } ); $("#ca-closepeer>a").text("error!"); return null; }		}).done(function {			api.edit(talkPageName, function(revision) 			{ 				var regexResult = revision.content.match(/\{\{ *[pP]eer review *(\| *archive *= *\d+) *\}\}/);				if(regexResult != null && typeof regexResult[1] != "undefined")				{					return {						text: revision.content.replace(regexResult[0], ""),						summary: "Closing peer review due to inactivity (via peerReviewCloser.js)"					};				}				else				{					if(typeof window.sessionStorage != "undefined")					{						window.sessionStorage.setItem("peerReviewCloserError","talkPageError");						location.reload;						return null;					}					else					{						mw.notify( 'Peer review page updated, but error updating the article talk page; it may require manual intervention.', { title: 'Peer review closing error' } );						$("#ca-closepeer>a").text("error!");						return null;					}				}			}) .done(function			{				location.reload;			}); });	}); }

$(document).ready(function {	if(typeof window.sessionStorage != "undefined")	{		if(window.sessionStorage.getItem("peerReviewCloserError") == "talkPageError")		{			mw.notify( 'Peer review page updated, but error updating the article talk page; it may require manual intervention.', { title: 'Peer review closing error' } );			window.sessionStorage.removeItem("peerReviewCloserError");		}	}	if(mw.config.get("wgCategories",[]).indexOf("Current peer reviews") >= 0)	{		mw.loader.using("mediawiki.util").done( function {			mw.util.addPortletLink('p-cactions', '#', "Close peer review", "ca-closepeer", "close this peer review"); $("#ca-closepeer").click( function(event)			{				event.preventDefault;				mw.loader.load( [ 'mediawiki.api.edit' ] ); //start loading, while the user is in the prompt				return closePeerReview;			}); });	} }); importScript('Wikipedia:Autoed/complete.js'); importScript('User:Headbomb/unreliable.js'); // Backlink: User:Headbomb/unreliable.js mw.loader.load('/w/index.php?title=User:Lupin/recent2.js&action=raw&ctype=text/javascript'); // User:Lupin/recent2.js importScript( 'User:MusikAnimal/responseHelper.js' ); // Backlink: User:MusikAnimal/responseHelper.js

mw.loader.load( '/w/index.php?title=User:Evad37/rater.js&action=raw&ctype=text/javascript' ); // Backlink: User:Evad37/rater.js importScript( 'User:Novem Linguae/Scripts/GANReviewTool.js' ); // Backlink: User:Novem Linguae/Scripts/GANReviewTool.js importScript('User:10nm/beta.js'); // Backlink: User:10nm/beta.js importScript('User:Ingenuity/AntiVandal.js'); // Backlink: User:Ingenuity/AntiVandal.js importScript('User:Qwertyytrewqqwerty/DisamAssist.js'); // Backlink: User:Qwertyytrewqqwerty/DisamAssist.js