diff --git a/src/index.html b/src/index.html index 7aa81e6..4cb6383 100644 --- a/src/index.html +++ b/src/index.html @@ -349,13 +349,36 @@
element + if (node.nodeName === 'SPAN' && node.classList.contains("stdout")) { + // Add the class 'tester' to #loader-wrapper + document.querySelector('#loader-wrapper').classList.add("tester"); + } + }); + }); + }; + + // Create an observer instance linked to the callback function + var observer = new MutationObserver(callback); + + // Start observing the target node for configured mutations + observer.observe(targetNode, config); + document.getElementById("loader-wrapper").addEventListener("animationend", (ev) => { if (ev.type === "animationend") { document.getElementById("loader-wrapper").style.display = "none"; - $('body').off('DOMNodeInserted'); + observer.disconnect(); if (autosave_number() > 0) { if (confirm("Des documents ont été sauvegardé automatiquement lors de la dernière session, voulez vous les restaurer ?")) { restore_editors();