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

Content deleted Content added
try it
apparently this is bad now
 
(4 intermediate revisions by 2 users not shown)
Line 23:
{
return {
text: revision.content.replace(regexResult[0], "{{Ombox|text='''ThisClosed [[WP:PR|peer review]] discussion has been closed.'''page}} <noinclude>[[Category:November 2018 peer reviews]]</noinclude>"),
summary: "Closing peer review due to inactivity (via [[User:Writ Keeper/Scripts/peerReviewCloser|peerReviewCloser.js]])"
};
Line 41:
{
return {
text: revision.content.replace(regexResult[0], "{{Oldsubst:Close peer review" + regexResult[1] + "}}"),
summary: "Closing peer review due to inactivity (via [[User:Writ Keeper/Scripts/peerReviewCloser|peerReviewCloser.js]])"
};
Line 47:
else
{
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")
{
Line 56 ⟶ 55:
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;
Line 70:
 
 
$(document).ready(function()
 
mw.hook("wikipage.content").add(function()
{
if(typeof window.sessionStorage != "undefined")
Line 81 ⟶ 80:
}
}
if(mw.config.get("wgCategories",[]).indexOf("Current peer reviews") >= 0)
{
mw.loader.using("mediawiki.util").done( function ()