changed alerts to the logging
This commit is contained in:
parent
35e208b61d
commit
527d7b6835
7 changed files with 24 additions and 24 deletions
|
@ -43,10 +43,10 @@ export default class windowman {
|
|||
throw new ReferenceError(new texts(`error_msg_fileNotFound`, [UI.CSS[index]]));
|
||||
}
|
||||
} catch(err) {
|
||||
const alerts = (await import(chrome.runtime.getURL(`/gui/scripts/alerts.js`))).default;
|
||||
const logging = (await import(chrome.runtime.getURL(`/scripts/logging.js`))).default;
|
||||
|
||||
// Raise an alert.
|
||||
alerts.error(err.name, err.message, err.stack, true, [source]);
|
||||
logging.error(err.name, err.message, err.stack, true, [source]);
|
||||
|
||||
// Stop loading the page when an error has occured; it's not going to work!
|
||||
if (!DEBUG) {
|
||||
|
@ -260,7 +260,7 @@ export default class windowman {
|
|||
async sync() {
|
||||
// Import the module.
|
||||
const secretariat = await import(chrome.runtime.getURL("scripts/secretariat.js"));
|
||||
const alerts = (await import(chrome.runtime.getURL(`/gui/scripts/alerts.js`))).default;
|
||||
const logging = (await import(chrome.runtime.getURL(`/scripts/logging.js`))).default;
|
||||
|
||||
async function fill() {
|
||||
let input_elements = document.querySelectorAll("[data-store]");
|
||||
|
@ -390,7 +390,7 @@ export default class windowman {
|
|||
|
||||
/* Enable the searching interface. */
|
||||
async function search() {
|
||||
const search_GUI_manager = (await import(chrome.runtime.getURL(`scripts/gui/windowman.search.js`)));
|
||||
const search_GUI_manager = (await import(chrome.runtime.getURL(`scripts/GUI/windowman.search.js`)));
|
||||
return (search_GUI_manager.search());
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {read, write, observe} from "/scripts/secretariat.js";
|
||||
import alerts from "/gui/scripts/alerts.js"
|
||||
import logging from "/scripts/logging.js"
|
||||
import texts from "/scripts/strings/read.js";
|
||||
|
||||
export function search() {
|
||||
|
@ -134,7 +134,7 @@ export function search() {
|
|||
write(DATA[`target`], DATA[`value`], (ELEMENT.hasAttribute(`data-store-location`)) ? parseInt(ELEMENT.getAttribute(`data-store-location`)) : -1);
|
||||
} catch(err) {
|
||||
// The JSON isn't valid.
|
||||
alerts.error(err.name, texts.localized(`JSON_parse_error`), err.stack, false);
|
||||
logging.error(err.name, texts.localized(`JSON_parse_error`), err.stack, false);
|
||||
};
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue