From 796a7765639f6431e7c814c8fb5a56cf52c60ebb Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Wed, 22 May 2024 23:56:30 +0800 Subject: [PATCH] load OOBE when not initialized properly --- src/scripts/pages/popup.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/scripts/pages/popup.js b/src/scripts/pages/popup.js index 2dfbf44..6bb98f2 100644 --- a/src/scripts/pages/popup.js +++ b/src/scripts/pages/popup.js @@ -71,7 +71,14 @@ class Page_Popup extends Page { this.update().then(() => { // Make sure that the website has been selected! if (this[`ref`]) { - let PAGE = chrome.runtime.getURL(`pages/popup/`.concat(PAGES[(this[`status`][`done`] <= -1 || this[`status`][`error`]) ? `error` : ((this[`status`][`done`] >= 1) ? `results` : `loading`)])); + let SELECTION = this[`status`][`init`] + ? (this[`status`][`done`] <= -1 || this[`status`][`error`]) + ? `error` + : ((this[`status`][`done`] >= 1) + ? `results` + : `loading`) + : `OOBE`; + let PAGE = chrome.runtime.getURL(`pages/popup/`.concat(PAGES[SELECTION])); // Replace the iframe src with the new page. (this.elements[`frame`].src != PAGE) ? this.elements[`frame`].src = PAGE : false;