And the fate of /gui is sealed

Make sure that the proper files that are not in `/gui` are loaded.
This commit is contained in:
buzz-lightsnack-2007 2024-04-15 15:49:22 +08:00
parent 527d7b6835
commit 0059314655
10 changed files with 9 additions and 82 deletions

View file

@ -5,7 +5,7 @@ import texts from "../strings/read.js";
import net from "../net.js";
// MAKE SURE TO TURN THIS OFF DURING BUILD.
let DEBUG = false;
let DEBUG = true;
export default class windowman {
static new(URL, height, width) {

View file

@ -6,8 +6,8 @@ import {read, write, forget, search} from "./secretariat.js";
import net from "./net.js";
import texts from "/scripts/strings/read.js";
import {Queue} from "./common.js";
import logging from "/gui/scripts/logging.js"
// const logging = (await import(chrome.runtime.getURL("gui/scripts/logging.js"))).default;
import logging from "/scripts/logging.js"
// const logging = (await import(chrome.runtime.getURL("/scripts/logging.js"))).default;
export default class filters {
constructor() {

View file

@ -64,7 +64,7 @@ export default class logging {
*/
static async error(ERROR_CODE, ERROR_MESSAGE, ERROR_STACK, critical = true) {
// Import the templating.
const texts = (await import(chrome.runtime.getURL("gui/scripts/read.js"))).default;
const texts = (await import(chrome.runtime.getURL("/scripts/strings/read.js"))).default;
// Display the error message.
console.error(texts.localized(`error_msg`, false, [ERROR_CODE, ERROR_MESSAGE, ERROR_STACK]));

View file

@ -13,9 +13,9 @@ Download a file from the network or locally.
*/
export default class net {
static async download(URL, TYPE, VERIFY_ONLY = false, STRICT = false) {
const texts = (await import(chrome.runtime.getURL(`gui/scripts/read.js`)))
const texts = (await import(chrome.runtime.getURL(`/scripts/strings/read.js`)))
.default;
const logging = (await import(chrome.runtime.getURL(`gui/scripts/logging.js`))).default;
const logging = (await import(chrome.runtime.getURL(`/scripts/logging.js`))).default;
let CONNECT, DATA;

View file

@ -39,7 +39,7 @@ function events(window) {
.addEventListener(`click`, async () => {
// Import the filters module.
const texts = (
await import(chrome.runtime.getURL(`gui/scripts/read.js`))
await import(chrome.runtime.getURL(`/scripts/strings/read.js`))
).default;
let filters = new (
await import(chrome.runtime.getURL(`scripts/filters.js`))
@ -59,7 +59,7 @@ function events(window) {
.addEventListener(`click`, async () => {
// Import the filters module.
const texts = (
await import(chrome.runtime.getURL(`gui/scripts/read.js`))
await import(chrome.runtime.getURL(`/scripts/strings/read.js`))
).default;
let filters = new (
await import(chrome.runtime.getURL(`scripts/filters.js`))
@ -79,7 +79,7 @@ function events(window) {
.addEventListener(`click`, async () => {
// Import the filters module.
let texts = (
await import(chrome.runtime.getURL(`gui/scripts/read.js`))
await import(chrome.runtime.getURL(`/scripts/strings/read.js`))
).default;
let filters = new (
await import(chrome.runtime.getURL(`scripts/filters.js`))