From a089496034a0e025723ae9cc9a8ba23b879c1e04 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Fri, 17 May 2024 16:18:24 +0800 Subject: [PATCH] Headers are mostly isolated --- scripts/GUI/builder/windowman.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/GUI/builder/windowman.js b/scripts/GUI/builder/windowman.js index 6f4c45a..fab7424 100644 --- a/scripts/GUI/builder/windowman.js +++ b/scripts/GUI/builder/windowman.js @@ -17,7 +17,7 @@ export default class windowman { // Prepare the window with its metadata. constructor(OPTIONS) { - const headers = (OPTIONS) => { + function headers (OPTIONS) { let LOAD_STATE = true; let UI = { "CSS": ["/styles/external/fonts/materialdesignicons.min.css", "/styles/external/materialize/css/materialize.css", "/styles/ui.css"], @@ -64,13 +64,15 @@ export default class windowman { }) : false; - this.header = UI; + return (UI); }; - - // Get the window. this[`metadata`] = chrome.windows.getCurrent(); + this[`options`] = OPTIONS; + + // Add the headers. + this[`headers`] = headers(((this[`options`] && (typeof this[`options`]).includes(`obj`)) ? this[`options`][`headers`] : false) ? this[`options`][`headers`] : null); headers(((OPTIONS != null && typeof OPTIONS == `object`) ? OPTIONS[`headers`] : false) ? OPTIONS[`headers`] : null); this.design();