Content deleted Content added
MusikAnimal (talk | contribs) rename |
MusikAnimal (talk | contribs) update – support for ANEW + some other minor fixes |
||
Line 1:
// <pre><nowiki>
(function() {
mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Wikipedia:Requests for page protection', "WP:RFPP");
mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Wikipedia:Administrator intervention against vandalism', "WP:AIV");
mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Wikipedia:Requests for permissions', "WP:PERM");
mw.util.addPortletLink('p-navigation', mw.config.get( 'wgServer' ) + '/wiki/Wikipedia:Administrators%27 noticeboard/Edit warring', "WP:ANEW");
var responses = {}, inline = false, indentation = ":", templateName = "", defaultPrompt = "", anew = false, unresolved;
if(document.title.indexOf("Editing Wikipedia:Requests for page protection (section)") !== -1) {
Line 280 ⟶ 281:
summary : "Report was good but is now stale. ",
prompt : "How long since the user last edited?"
}
};
} else if(document.title.indexOf("Editing Wikipedia:Administrators' noticeboard/Edit warring (section)") !== -1) {
anew = true;
indentation = "*";
templateName = "AN3";
defaultPrompt = "Duration?";
responses = {
"Blocked" : {
code : "b|X",
summary : "blocked "
},
"Nom. blocked" : {
code : "nb|X",
summary : "nominator blocked "
},
"Both blocked" : {
code : "bb|X",
summary : "both blocked "
},
"Already blocked" : {
code : "ab",
summary : "already blocked"
},
"No violation" : {
code : "nv",
summary : "no violation"
},
"No 3RR vio" : {
code : "nve",
summary : "three-revert rule not applicable"
},
"Stale" : {
code : "s",
summary : "stale"
},
"Declined" : {
code : "d",
summary : "declined ",
prompt : "Reason?"
},
"Malformed report" : {
code : "mr",
summary : "declined – malformed report"
},
"Not blocked" : {
code : "not",
summary : "not blocked"
},
"Page protected" : {
code : "p",
summary : "page protected"
},
"Page prot'd dr" : {
code : "pe",
summary : "page protected – consider dispute resolution"
},
"Warned" : {
code : "w",
summary : "warned user(s)"
},
"Note" : {
code : "n",
summary : "Note. ",
prompt : "Note:",
unresolved : true
},
"Comment" : {
code : "c",
summary : "Comment. ",
prompt : "Comment:",
unresolved : true
}
};
Line 309 ⟶ 382:
}
if(anew && !unresolved) {
$("#wpSummary").val($("#wpSummary").val() + response.summary + value + " (using [[User:MusikAnimal/responseHelper|responseHelper]])");▼
var textArray = $textarea.val().split("\n");
$textarea.val(
textArray[0].replace('(Result: )','(Result: ' + (response.summary[0].toUpperCase() + response.summary.slice(1) + value).trim() + ')') +
'\n' + $textarea.val().split("\n").splice(1).join("\n")
);
}
▲ $("#wpSummary").val($("#wpSummary").val() + (response.summary + value).trim() + " (using [[User:MusikAnimal/responseHelper|responseHelper]])");
};
|