From 942532db10076fc696aeb35cc2b5d1da304ff63f Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Fri, 3 May 2024 11:49:08 +0800 Subject: [PATCH] re-enable window observation for session storage fix --- scripts/pages/popup.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/pages/popup.js b/scripts/pages/popup.js index 906255c..c67adfc 100644 --- a/scripts/pages/popup.js +++ b/scripts/pages/popup.js @@ -3,7 +3,7 @@ */ // Import modules. -import {session} from "/scripts/secretariat.js"; +import {session, observe} from "/scripts/secretariat.js"; import Window from "/scripts/GUI/window.js"; import Page from "/scripts/pages/page.js"; import Loader from "/scripts/GUI/loader.js"; @@ -32,6 +32,7 @@ class Page_Popup extends Page { "error": "error.htm" } + // This will be rewritten to only get the active tab. It should not change whenever the user clicks another tab; it's assumed that he will open the pop-up seperately over there. // Get the last edited site. let SITE = {}; SITE = await session.read([`last`], -1); @@ -61,7 +62,7 @@ class Page_Popup extends Page { // Check if the frame is available. if (this.elements[`frame`].length) { await this.switch(); - // observe((DATA) => {this.switch();}); + this.background(); } else { this.loading(); }