initial attempt to easter-eggify the loading screen

This commit is contained in:
buzz-lightsnack-2007 2024-04-23 18:20:31 +08:00
parent 0aeb0d819b
commit 5239ec71d7

View file

@ -5,18 +5,29 @@
// Import modules. // Import modules.
import {read, forget} from "/scripts/secretariat.js"; import {read, forget} from "/scripts/secretariat.js";
import windowman from "/scripts/GUI/windowman.js"; import windowman from "/scripts/GUI/windowman.js";
import Window from "/scripts/GUI/window.js";
import Page from "/scripts/pages/page.js"; import Page from "/scripts/pages/page.js";
import texts from "/scripts/strings/read.js";
class Page_Popup extends Page { class Page_Popup extends Page {
constructor() { constructor() {
super(); super();
(this.events) ? this.events() : false; (this.events) ? this.events() : false;
};
content() {
if (document.querySelector(`[data-text="loading_text"]`)) {
document.querySelector(`[data-text="loading_text"]`).textContent = (new texts())
}
} }
events() { events() {
(document.querySelector(`[data-action="open,settings"]`)) ? document.querySelector(`[data-action="open,settings"]`).addEventListener("click", () => { (document.querySelector(`[data-action="open,settings"]`)) ? document.querySelector(`[data-action="open,settings"]`).addEventListener("click", () => {
chrome.runtime.openOptionsPage(); chrome.runtime.openOptionsPage();
}) : false; }) : false;
(document.querySelector(`[data-action="open,help"]`)) ? document.querySelector(`[data-action="open,help"]`).addEventListener("click", () => {
new Window(`help.htm`);
}) : false;
} }
} }