From ec17d000c113f5182335cfed085afe7e0ff38608 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Sun, 12 May 2024 20:19:02 +0800 Subject: [PATCH] increase clarity regarding additional sources addition --- scripts/GUI/builder/windowman.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/GUI/builder/windowman.js b/scripts/GUI/builder/windowman.js index 8d40138..5c54aca 100644 --- a/scripts/GUI/builder/windowman.js +++ b/scripts/GUI/builder/windowman.js @@ -22,7 +22,13 @@ export default class windowman { }; // Add additional sources. - (OPTIONS) ? ((OPTIONS[`CSS`] != null) ? ((Array.isArray(OPTIONS[`CSS`])) ? UI[`CSS`] = UI[`CSS`].concat(OPTIONS[`CSS`]) : UI[`CSS`].push(OPTIONS[`CSS`])) : null) : null; + (OPTIONS && (typeof OPTIONS).includes(`obj`)) + ? ((OPTIONS[`CSS`] != null) + ? ((Array.isArray(OPTIONS[`CSS`])) + ? UI[`CSS`] = [...UI[`CSS`], ...OPTIONS[`CSS`]] + : UI[`CSS`].push(OPTIONS[`CSS`])) + : null) + : null; (UI[`CSS`]).forEach(async (source) => { try { @@ -51,10 +57,7 @@ export default class windowman { }; }; }) - } - - // Get the window. - this[`metadata`] = chrome.windows.getCurrent(); + }; /* Fill in data and events. */ function appearance() { @@ -258,7 +261,10 @@ export default class windowman { actions(); } - headers(((OPTIONS != null && typeof OPTIONS == `object`) ? OPTIONS[`headers`] : false)? OPTIONS[`headers`] : null); + // Get the window. + this[`metadata`] = chrome.windows.getCurrent(); + + headers(((OPTIONS != null && typeof OPTIONS == `object`) ? OPTIONS[`headers`] : false) ? OPTIONS[`headers`] : null); appearance(); events(); }