mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
parent
9d5e8b71ed
commit
57ef8a4166
7 changed files with 19 additions and 27 deletions
|
@ -13,23 +13,7 @@
|
|||
window.scope.settings = scope;
|
||||
}
|
||||
|
||||
var logging = {};
|
||||
(function(){
|
||||
var loggingQueue = [];
|
||||
require.on("./logging", function(realLogging){
|
||||
logging = realLogging;
|
||||
|
||||
loggingQueue.forEach(function(logEntry){
|
||||
logging[logEntry.name](...logEntry.args, logEntry.date);
|
||||
});
|
||||
loggingQueue = [];
|
||||
});
|
||||
["error", "warning", "message", "notice", "verbose"].forEach(function(name){
|
||||
logging[name] = function(...args){
|
||||
loggingQueue.push({name, args, date: new Date()});
|
||||
};
|
||||
});
|
||||
}());
|
||||
const logging = require("./logging");
|
||||
const settingDefinitions = require("./settingDefinitions.js");
|
||||
const definitionsByName = {};
|
||||
const defaultSymbol = "";
|
||||
|
@ -568,6 +552,9 @@
|
|||
|
||||
logging.verbose("loading settings");
|
||||
let initialized = false;
|
||||
scope.isInitialized = function(){
|
||||
return initialized;
|
||||
};
|
||||
const initEvents = [];
|
||||
scope.init = function(storage){
|
||||
if (initialized){
|
||||
|
@ -631,4 +618,6 @@
|
|||
});
|
||||
};
|
||||
Object.seal(scope);
|
||||
|
||||
require.emit("./settings");
|
||||
}());
|
Loading…
Add table
Add a link
Reference in a new issue