# HG changeset patch # User HIROSE Yuuji # Date 1645314451 -32400 # Node ID 759070ee3d204a97ecc9326f7b35f8c49eb6fb24 # Parent 8afc139044f1b3d9da402eaa56f6eb08330085c2 Replace @all for ajaxpost diff -r 8afc139044f1 -r 759070ee3d20 s4-main.js --- a/s4-main.js Thu Feb 10 21:36:57 2022 +0900 +++ b/s4-main.js Sun Feb 20 08:47:31 2022 +0900 @@ -176,7 +176,7 @@ // Append absolutely new articles. ntr = n.parentNode; addEventsToNewTr(ntr) - tbody.appendChild(ntr); + tbody.appendChild(atMarkView(ntr)); ntr.classList.add("dissolving"); let localntr = ntr; setTimeout(() => { @@ -782,6 +782,17 @@ if (!te || !te[0]) return; te[0].addEventListener("keydown", helpMarkdown, false); } + function atMarkView(elem) { + // Enclose "@all" with span + for (i of elem.querySelectorAll("td.repl")) { + let ii = i.innerHTML; + if (ii.startsWith("@all")) { + ii = ii.replace(/^@all/,'
@all
'); + i.innerHTML = ii; + } + } + return elem; + } function initBlogs() { // Auto-complete #xxxx let i, check = collectElementsByAttr("input", "name", "notifyto"); @@ -820,14 +831,7 @@ } // Hack article_m links registPjaxViewers(document.querySelectorAll("a[href]")); - // Enclose "@all" with span - for (i of document.querySelectorAll("td.repl")) { - let ii = i.innerHTML; - if (ii.startsWith("@all")) { - ii = ii.replace(/^@all/,'
@all
'); - i.innerHTML = ii; - } - } + atMarkView(document); } function initGrpAction() { var rev = document.getElementById("reverse");