Mercurial > hgrepos > hgweb.cgi > s4
diff s4-main.js @ 910:043748271354
Copy attributes from old POST button to new ajax-post button
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 05 Jan 2021 13:14:26 +0900 |
parents | 1442d73c55e5 |
children | fe6e6b72de17 |
line wrap: on
line diff
--- a/s4-main.js Tue Jan 05 13:03:51 2021 +0900 +++ b/s4-main.js Tue Jan 05 13:14:26 2021 +0900 @@ -620,8 +620,10 @@ console.log("b="+b+", tc="+b.textContent); b.addEventListener("click", ajaxPost, false); // i.insertAdjacentElement('afterend', b); + b.setAttribute("class", i.getAttribute("class")) + b.setAttribute("title", i.getAttribute("title")) + i.parentNode.replaceChild(b, i); b.id = i.id; - i.parentNode.replaceChild(b, i); i.remove(); } i = document.getElementById("reload");