Mercurial > hgrepos > hgweb.cgi > s4
changeset 981:eb51a80f73c2 draft
Divide task of ReplyHover()
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 31 May 2022 11:59:33 +0900 |
parents | f0b63223cb80 |
children | f5a7fbd6c0d0 |
files | s4-main.js |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-main.js Tue May 31 11:52:46 2022 +0900 +++ b/s4-main.js Tue May 31 11:59:33 2022 +0900 @@ -184,7 +184,7 @@ localntr.classList.remove("dissolving"); localntr.classList.add("emerging"); }, 100); - initReplyHover(ntr); + rewriteReplyHover(ntr); cnt++; } mathjaxUpdate(newids); @@ -1034,7 +1034,7 @@ }); ta.parentNode.appendChild(btn); } - function initReplyHover(unit) { + function rewriteReplyHover(unit) { function getTextById(id) { let repltd = document.getElementById(id); if (repltd) { @@ -1071,6 +1071,12 @@ } } } + function initReplyHover(unit) { + if (mathjax && MathJax.startup) + MathJax.startup.promise.then(()=>rewriteReplyHover()); + else + rewriteReplyHover(); + } function init() { isOlderJS = !("insertAdjacentElement" in document.body); initGrpAction(); @@ -1079,10 +1085,7 @@ initTextarea(); initGrphome(); initMath(); - if (mathjax && MathJax.startup) - MathJax.startup.promise.then(()=>initReplyHover()); - else - initReplyHover(); + initReplyHover(); } document.addEventListener('DOMContentLoaded', init, null); })();