diff --git a/htdocs/js/DragNDrop/dragndrop.js b/htdocs/js/DragNDrop/dragndrop.js index d7e78b693f..e46faad6e7 100644 --- a/htdocs/js/DragNDrop/dragndrop.js +++ b/htdocs/js/DragNDrop/dragndrop.js @@ -182,7 +182,4 @@ } }); observer.observe(document.body, { childList: true, subtree: true }); - - // Stop the mutation observer when the window is closed. - window.addEventListener('unload', () => observer.disconnect()); })(); diff --git a/htdocs/js/DropDown/dropdown.js b/htdocs/js/DropDown/dropdown.js index c10d2b2ad5..170a96c837 100644 --- a/htdocs/js/DropDown/dropdown.js +++ b/htdocs/js/DropDown/dropdown.js @@ -57,7 +57,4 @@ } }); observer.observe(document.body, { childList: true, subtree: true }); - - // Stop the mutation observer when the window is closed. - window.addEventListener('unload', () => observer.disconnect()); })(); diff --git a/htdocs/js/Essay/essay.js b/htdocs/js/Essay/essay.js index 7f6f11df0c..3c7a747e7c 100644 --- a/htdocs/js/Essay/essay.js +++ b/htdocs/js/Essay/essay.js @@ -76,6 +76,4 @@ } }); observer.observe(document.body, { childList: true, subtree: true }); - - window.addEventListener('unload', () => observer.disconnect()); })(); diff --git a/htdocs/js/Feedback/feedback.js b/htdocs/js/Feedback/feedback.js index 98ddfee618..5328334ec2 100644 --- a/htdocs/js/Feedback/feedback.js +++ b/htdocs/js/Feedback/feedback.js @@ -91,7 +91,4 @@ }); }); observer.observe(document.body, { childList: true, subtree: true }); - - // Stop the mutation observer when the window is closed. - window.addEventListener('unload', () => observer.disconnect()); })(); diff --git a/htdocs/js/ImageView/imageview.js b/htdocs/js/ImageView/imageview.js index be6ee5b1f3..e039efd02d 100644 --- a/htdocs/js/ImageView/imageview.js +++ b/htdocs/js/ImageView/imageview.js @@ -330,7 +330,4 @@ }); }); observer.observe(document.body, { childList: true, subtree: true }); - - // Stop the mutation observer when the window is closed. - window.addEventListener('unload', () => observer.disconnect()); })(); diff --git a/htdocs/js/MathQuill/mqeditor.js b/htdocs/js/MathQuill/mqeditor.js index d6698a1e18..7a950370d0 100644 --- a/htdocs/js/MathQuill/mqeditor.js +++ b/htdocs/js/MathQuill/mqeditor.js @@ -599,7 +599,4 @@ } }); observer.observe(document.body, { childList: true, subtree: true }); - - // Stop the mutation observer when the window is closed. - window.addEventListener('unload', () => observer.disconnect()); })(); diff --git a/htdocs/js/MathView/mathview.js b/htdocs/js/MathView/mathview.js index 1952526154..92e3acb10a 100644 --- a/htdocs/js/MathView/mathview.js +++ b/htdocs/js/MathView/mathview.js @@ -431,7 +431,4 @@ } }); observer.observe(document.body, { childList: true, subtree: true }); - - // Stop the mutation observer when the window is closed. - window.addEventListener('unload', () => observer.disconnect()); })(); diff --git a/htdocs/js/QuickMatrixEntry/quickmatrixentry.js b/htdocs/js/QuickMatrixEntry/quickmatrixentry.js index beb784f4cc..e2bcd6305e 100644 --- a/htdocs/js/QuickMatrixEntry/quickmatrixentry.js +++ b/htdocs/js/QuickMatrixEntry/quickmatrixentry.js @@ -128,5 +128,4 @@ } }); observer.observe(document.body, { childList: true, subtree: true }); - window.addEventListener('unload', () => observer.disconnect()); })(); diff --git a/htdocs/js/RadioButtons/RadioButtons.js b/htdocs/js/RadioButtons/RadioButtons.js index 48cd2f4d54..75698e6ee5 100644 --- a/htdocs/js/RadioButtons/RadioButtons.js +++ b/htdocs/js/RadioButtons/RadioButtons.js @@ -47,7 +47,4 @@ } }); observer.observe(document.body, { childList: true, subtree: true }); - - // Stop the mutation observer when the window is closed. - window.addEventListener('unload', () => observer.disconnect()); })(); diff --git a/htdocs/js/RadioMultiAnswer/RadioMultiAnswer.js b/htdocs/js/RadioMultiAnswer/RadioMultiAnswer.js index 1fe68e036f..e9db03099f 100644 --- a/htdocs/js/RadioMultiAnswer/RadioMultiAnswer.js +++ b/htdocs/js/RadioMultiAnswer/RadioMultiAnswer.js @@ -153,7 +153,4 @@ } }); observer.observe(document.body, { childList: true, subtree: true }); - - // Stop the mutation observer when the window is closed. - window.addEventListener('unload', () => observer.disconnect()); })(); diff --git a/htdocs/js/Scaffold/scaffold.js b/htdocs/js/Scaffold/scaffold.js index 060c00747b..37a296f9aa 100644 --- a/htdocs/js/Scaffold/scaffold.js +++ b/htdocs/js/Scaffold/scaffold.js @@ -34,7 +34,4 @@ }); }); observer.observe(document.body, { childList: true, subtree: true }); - - // Stop the mutation observer when the window is closed. - window.addEventListener('unload', () => observer.disconnect()); })();