From 75e663e65bf85c86c971a2c072db504cc26d74d4 Mon Sep 17 00:00:00 2001 From: ToasterTeam Date: Sat, 14 Feb 2026 22:09:58 -0600 Subject: [PATCH 1/2] Create popup.js --- static/popup.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 static/popup.js diff --git a/static/popup.js b/static/popup.js new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/static/popup.js @@ -0,0 +1 @@ + From e5a7737afabe47dd8e13e3bc60b7ff4f55ad3a7e Mon Sep 17 00:00:00 2001 From: ToasterTeam Date: Sat, 14 Feb 2026 22:21:26 -0600 Subject: [PATCH 2/2] popup.js script created the popup.js is created so that when goguardian scenes is activated, it will activate a "unsaved data could be lost" which prevents goguardian from closing the tab. --- static/popup.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/popup.js b/static/popup.js index 8b1378917..57a5249df 100644 --- a/static/popup.js +++ b/static/popup.js @@ -1 +1,6 @@ - +window.addEventListener("beforeunload", function (e) { + e.preventDefault(); + e.returnValue = ''; +}); +/* this script prevents the goguardian scene from automatically closing this to the "Hey there! you're teacher doesn't want you to browse right now." message popup +/*, which means the user can still use this website without any issue.