use a more efficient for loop and change CSS paths
This commit is contained in:
parent
71c988fd52
commit
00e37a229d
1 changed files with 5 additions and 14 deletions
|
@ -19,19 +19,13 @@ export default class windowman {
|
||||||
|
|
||||||
// Prepare the window with its metadata.
|
// Prepare the window with its metadata.
|
||||||
constructor() {
|
constructor() {
|
||||||
async function headers() {
|
function headers() {
|
||||||
let LOAD_STATE = true;
|
let LOAD_STATE = true;
|
||||||
let UI = {
|
let UI = {
|
||||||
CSS: [
|
CSS: [chrome.runtime.getURL("/styles/external/fonts/materialdesignicons.min.css"), chrome.runtime.getURL("/styles/external/materialize/css/materialize.css"), chrome.runtime.getURL("/styles/ui.css")]
|
||||||
chrome.runtime.getURL("/gui/styles/external/fonts/materialdesignicons.min.css"),
|
|
||||||
chrome.runtime.getURL("/gui/styles/external/materialize/css/materialize.css"),
|
|
||||||
chrome.runtime.getURL("/gui/styles/ui.css"),
|
|
||||||
]
|
|
||||||
};
|
};
|
||||||
|
|
||||||
for (let index = 0; index < UI[`CSS`].length; index++) {
|
(UI[`CSS`]).forEach(async (source) => {
|
||||||
const source = UI.CSS[index];
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let resource = false;
|
let resource = false;
|
||||||
|
|
||||||
|
@ -57,12 +51,9 @@ export default class windowman {
|
||||||
// Stop loading the page when an error has occured; it's not going to work!
|
// Stop loading the page when an error has occured; it's not going to work!
|
||||||
if (!DEBUG) {
|
if (!DEBUG) {
|
||||||
window.close();
|
window.close();
|
||||||
}
|
|
||||||
|
|
||||||
// Stop loading immediately during the error.
|
|
||||||
break;
|
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the window.
|
// Get the window.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue