Content deleted Content added
Writ Keeper (talk | contribs) test |
Writ Keeper (talk | contribs) apparently this is bad now |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1:
{
mw.loader.using("mediawiki.api").done( function ()
Line 19:
api.edit(mw.config.get("wgPageName"), function(revision)
{
var regexResult = revision.content.match(/\{\{ *
if(regexResult != null)
{
return {
text: revision.content.replace(regexResult[0], "{{
summary: "Closing peer review due to inactivity (via [[User:Writ Keeper/Scripts/peerReviewCloser
};
}
Line 37:
api.edit(talkPageName, function(revision)
{
var regexResult = revision.content.match(/\{\{ *
if(regexResult != null && typeof regexResult[1] != "undefined")
{
return {
text: revision.content.replace(regexResult[0], "{{
summary: "Closing peer review due to inactivity (via [[User:Writ Keeper/Scripts/peerReviewCloser
};
}
else
{
if(typeof window.sessionStorage != "undefined")
mw.notify( 'Peer review page uopdated, but error updating the article talk page; it may require manual intervention.', { title: 'Peer review closing error' } );▼
{
$("#ca-closepeer>a").text("error!");▼
window.sessionStorage.setItem("peerReviewCloserError","talkPageError");
return null;▼
___location.reload();
▲ return null;
}
else
{
▲ mw.notify( 'Peer review page
▲ $("#ca-closepeer>a").text("error!");
return null;
}
}
})
Line 61 ⟶ 70:
$(document).ready(function()
{
if(typeof window.sessionStorage != "undefined")
if(mw.config.get("wgCategories").indexOf("Current peer reviews") >= 0)▼
{
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 ()
|