# HG changeset patch # User HIROSE Yuuji # Date 1653965973 -32400 # Node ID eb51a80f73c2087743e90097e12e4d0afa7a7398 # Parent f0b63223cb8051c36f6d2b5de153d2cdf3962356 Divide task of ReplyHover() diff -r f0b63223cb80 -r eb51a80f73c2 s4-main.js --- 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); })();