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

Content deleted Content added
There is always something that doesn't work
Remove auto indent
Line 88:
let editSummary = "/* " + header.replaceAll("_", " ") + " */ " + replyOption[2] + " ([[User:Terasail/Edit_Request_Tool|Edit Request Tool]])";
if (replyOption[1] != "Close") {
let lastMsg = wikitext.lastIndexOf("\n", wikitext.lastIndexOf("(UTC)")) + 1;
wikitext = wikitext.trim() + "\n:";
while(lastMsg == wikitext.indexOf(":", lastMsg)) {
lastMsg++;
wikitext += ":";
}
if (replyOption[0] != "") { wikitext += "{{subst:" + dataERT.protections[boxType][1] + replyOption[0] + "}} "; }
if (inputText != "") { wikitext += inputText.replaceAll(/\s*~~~~\s*/g, "") + " "; }
Line 121 ⟶ 116:
boxType = boxType.replace("full", "fully");
let tableElem = currentBox.parentElement;
$('<table style="border:1px solid #A2A9B1; border-radius:2px; padding:12px10px 16px 0; margin:auto; max-width:55em; clear:both;"><tr><td style="color:#808080"><div style="font-style:italic; margin-left:1em;">' + pageWatchers + '</div><div>Quick options:</div></td></tr><tr style="display: flex; justify-content: center;"><td></td></tr><tr><td style="color:#808080">Custom response:</td></tr><tr style="text-align:center;"><td></td></tr><tr style="background:#F6F6F6;"><td style="display:none;"><div style="color:#808080">Preview:</div><div></div></td></tr><tr style="display: flex; justify-content: right;"><td></td></tr></table>').insertAfter(tableElem);
let responseTable = tableElem.nextElementSibling.children[0];
let firstRow = responseTable.children[1].children[0];