User:Terasail/Edit Request Tool.js: Difference between revisions

Content deleted Content added
Dont use test data
Don't run on COI requests
Line 327:
for (let i = 0; i < editRequestBoxes.length; i++) {
let currentBox = editRequestBoxes[i].children[0]; //The tbody tag for the box
if (typeof(currentBox.parentElement.dataset.origlevel) != "undefined") {
let isSmall = false;
if (editRequestBoxes[i].id == "") {
isSmall = true;
}
let replyButton = new OO.ui.ButtonWidget( {
icon: "recentChanges",
flags icon: ["progressiverecentChanges"],
label flags: ["Respondprogressive"],
invisibleLabel label: isSmall"Respond",
invisibleLabel: isSmall,
title: "Respond to the edit request."
});
});
replyButton.on("click", function() {
addButtons(currentBox, dataERT, replyButton);
replyButton.setDisabled(true);
});
replyButton.$element[0].style = "margin:2px 0";
if (isSmall) {
$(currentBox.children[0].children[0]).append(replyButton.$element);
} else {
$(currentBox).append('<tr><td colspan=2><div style="display: flex; justify-content: center;"></div></td></tr>');
$(currentBox.children[1].children[0].children[0]).append(replyButton.$element);
});
}
}