From d7bcbc04777a0780f6eb805cd877908acaf6b646 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Wed, 15 May 2024 17:11:40 +0800 Subject: [PATCH] add other extras to windowman --- scripts/GUI/builder/windowman.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/GUI/builder/windowman.js b/scripts/GUI/builder/windowman.js index ddb73f7..9619753 100644 --- a/scripts/GUI/builder/windowman.js +++ b/scripts/GUI/builder/windowman.js @@ -6,6 +6,7 @@ import Tabs from "/scripts/GUI/tabs.js"; import {global, observe} from "/scripts/secretariat.js"; import {URLs} from "/scripts/utils/URLs.js"; import wait from "/scripts/utils/wait.js"; +import UI from "/scripts/GUI/builder/windowman.search.js"; export default class windowman { elements = {}; @@ -484,15 +485,19 @@ export default class windowman { } }; - /* Enable the searching interface. */ - async function search() { - const search_GUI_manager = (await import(chrome.runtime.getURL(`scripts/GUI/builder/windowman.search.js`))).default; - return (search_GUI_manager.Search()); - }; + /* + Instantiate the extras. + */ + const extras = () => { + // Add the search interface. + (Object.keys(UI)).forEach((FEATURE) => { + this[FEATURE] = new UI[FEATURE](); + }) + } fill(); write(); - this[`search`] = search(); + extras(); // Update the input elements. observe((what) => {