Content deleted Content added
Link change |
Fixed problems with Template:Request edit caused by Special:Diff/965374418/1005728991 & added reply option to all template variants |
||
Line 32:
infoBox.$element[0].style = "margin:10px auto 0px; max-width:50em; text-align:left";
var header = "";
var curElement = currentBox.parentNode; //Table tag
do {
curElement = curElement.previousElementSibling;
Line 72:
tempStr = "|A";
}
var
if (
}
if (
infoBox.setLabel('Failed to find {{Request edit}} template, please report to "User talk:Terasail/COI Request Tool"');
infoBox.setType("error");
} else {
var editSummary = "/* " + header.replaceAll("_", " ") + " */ ";
if (selectedReply == "REMOVE") {
Line 150 ⟶ 147:
//Toggle answer button
var answerB = new OO.ui.ToggleButtonWidget( {
icon: "
label: "Close",
value:
});
answerB.on("click", function() {
Line 239 ⟶ 236:
}
if (COIRequestBoxes) {
mw.loader.using(["oojs-ui-core", "oojs-ui-widgets"]).done(function() {
mw.loader.load(["oojs-ui.styles.icons-alerts", "oojs-ui.styles.icons-interactions", "oojs-ui.styles.icons-moderation", "oojs-ui.styles.icons-user", "oojs-ui.styles.icons-editing-core"]);
▲ var banners = document.getElementsByClassName("plainlinks tmbox tmbox-notice");
▲ for (i = 0; i < banners.length; i++) {
var
if (
if (edReqCheck.innerText.search("The requested edits backlog is") != -1) { //For unanswered boxes
▲ var currentBox = banners[i].children[0];
var replyB = new OO.ui.ButtonWidget( { ▼
icon: "edit",▼
flags: "progressive",▼
invisibleLabel: true▼
});▼
replyB.$element[0].style = "margin:5px 0px";▼
$(currentBox.children[0].children[0]).append(replyB.$element);▼
replyB.on("click", function() {▼
currentBox.parentElement.setAttribute("class", "plainlinks tmbox tmbox-notice");▼
var img = currentBox.children[0].children[0].children[0]▼
img.width = 53;▼
img.height = 53;▼
img.src = "//upload.wikimedia.org/wikipedia/commons/f/f4/Info_talk.png"▼
img.scrset = "";▼
currentBox.children[0].children[1].innerHTML = '<div style="text-align:center; font-size:125%">Please read the instructions for the parameters used by this template for accepting and declining them, and review the request below and make the edit if it is well sourced, neutral, and follows other Wikipedia guidelines and policies.</div>'▼
replyB.$element.remove();▼
loadButtons(currentBox);
} else { //For answered boxes
});▼
▲ var replyB = new OO.ui.ButtonWidget( {
▲ icon: "edit",
▲ flags: "progressive",
loadButtons(banners[i].children[0]);▼
▲ invisibleLabel: true
▲ });
▲ replyB.$element[0].style = "margin:5px 0px";
▲ $(currentBox.children[0].children[0]).append(replyB.$element);
▲ replyB.on("click", function() {
▲ currentBox.parentElement.setAttribute("class", "plainlinks tmbox tmbox-notice editrequest");
▲ var img = currentBox.children[0].children[0].children[0]
▲ img.width = 53;
▲ img.height = 53;
▲ img.src = "//upload.wikimedia.org/wikipedia/commons/f/f4/Info_talk.png"
▲ img.scrset = "";
▲ currentBox.children[0].children[1].innerHTML = '<div style="text-align:center; font-size:125%">Please read the instructions for the parameters used by this template for accepting and declining them, and review the request below and make the edit if it is well sourced, neutral, and follows other Wikipedia guidelines and policies.</div>'
▲ replyB.$element.remove();
▲ });
}
} else {
a = edReqCheck.innerText;
}
}
|