User:Writ Keeper/Scripts/peerReviewCloser.js: Difference between revisions

Content deleted Content added
adjust edit summary
try it
Line 48:
{
mw.notify( 'Peer review page updated, but error updating the article talk page; it may require manual intervention.', { title: 'Peer review closing error' } );
if(typeof window.sessionStorage != "undefined")
$("#ca-closepeer>a").text("error!");
return null;{
window.sessionStorage.setItem("peerReviewCloserError","talkPageError");
___location.reload();
return null;
}
else
{
$("#ca-closepeer>a").text("error!");
return null;
}
}
})
Line 64 ⟶ 73:
mw.hook("wikipage.content").add(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)
{