From 5239ec71d78de39976c7a8efffef946673aa62cd Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Tue, 23 Apr 2024 18:20:31 +0800 Subject: [PATCH] initial attempt to easter-eggify the loading screen --- scripts/pages/popup.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/pages/popup.js b/scripts/pages/popup.js index 866fb8a..a084028 100644 --- a/scripts/pages/popup.js +++ b/scripts/pages/popup.js @@ -5,18 +5,29 @@ // Import modules. import {read, forget} from "/scripts/secretariat.js"; import windowman from "/scripts/GUI/windowman.js"; +import Window from "/scripts/GUI/window.js"; import Page from "/scripts/pages/page.js"; +import texts from "/scripts/strings/read.js"; class Page_Popup extends Page { constructor() { super(); (this.events) ? this.events() : false; + }; + + content() { + if (document.querySelector(`[data-text="loading_text"]`)) { + document.querySelector(`[data-text="loading_text"]`).textContent = (new texts()) + } } events() { (document.querySelector(`[data-action="open,settings"]`)) ? document.querySelector(`[data-action="open,settings"]`).addEventListener("click", () => { chrome.runtime.openOptionsPage(); }) : false; + (document.querySelector(`[data-action="open,help"]`)) ? document.querySelector(`[data-action="open,help"]`).addEventListener("click", () => { + new Window(`help.htm`); + }) : false; } }