mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-31 09:01:56 +01:00
parent
9d5e8b71ed
commit
57ef8a4166
@ -8,9 +8,9 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="actions"></div>
|
<div id="actions"></div>
|
||||||
<script src="../lib/require.js"></script>
|
<script src="../lib/require.js"></script>
|
||||||
|
<script src="../lib/logging.js"></script>
|
||||||
<script src="../lib/settingDefinitions.js"></script>
|
<script src="../lib/settingDefinitions.js"></script>
|
||||||
<script src="../lib/settings.js"></script>
|
<script src="../lib/settings.js"></script>
|
||||||
<script src="../lib/logging.js"></script>
|
|
||||||
<script src="browserAction.js"></script>
|
<script src="browserAction.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -16,7 +16,11 @@
|
|||||||
scope = window.scope.logging;
|
scope = window.scope.logging;
|
||||||
}
|
}
|
||||||
|
|
||||||
const settings = require("./settings");
|
let settings = false;
|
||||||
|
require.on("./settings", function(realSettings){
|
||||||
|
settings = realSettings;
|
||||||
|
settings.loaded.then(scope.clearQueue);
|
||||||
|
});
|
||||||
|
|
||||||
var prefix = "";
|
var prefix = "";
|
||||||
|
|
||||||
@ -39,7 +43,7 @@
|
|||||||
if (!date){
|
if (!date){
|
||||||
date = new Date();
|
date = new Date();
|
||||||
}
|
}
|
||||||
if (settings.isStillDefault || queue.length){
|
if (!settings || !settings.isInitialized() || queue.length){
|
||||||
queue.push({level, args, date});
|
queue.push({level, args, date});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -96,7 +100,6 @@
|
|||||||
metaLog("logging queue cleared");
|
metaLog("logging queue cleared");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
settings.loaded.then(scope.clearQueue);
|
|
||||||
scope.error = error;
|
scope.error = error;
|
||||||
scope.warning = warning;
|
scope.warning = warning;
|
||||||
scope.message = message;
|
scope.message = message;
|
||||||
|
@ -13,23 +13,7 @@
|
|||||||
window.scope.settings = scope;
|
window.scope.settings = scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
var logging = {};
|
const logging = require("./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 settingDefinitions = require("./settingDefinitions.js");
|
const settingDefinitions = require("./settingDefinitions.js");
|
||||||
const definitionsByName = {};
|
const definitionsByName = {};
|
||||||
const defaultSymbol = "";
|
const defaultSymbol = "";
|
||||||
@ -568,6 +552,9 @@
|
|||||||
|
|
||||||
logging.verbose("loading settings");
|
logging.verbose("loading settings");
|
||||||
let initialized = false;
|
let initialized = false;
|
||||||
|
scope.isInitialized = function(){
|
||||||
|
return initialized;
|
||||||
|
};
|
||||||
const initEvents = [];
|
const initEvents = [];
|
||||||
scope.init = function(storage){
|
scope.init = function(storage){
|
||||||
if (initialized){
|
if (initialized){
|
||||||
@ -631,4 +618,6 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
Object.seal(scope);
|
Object.seal(scope);
|
||||||
|
|
||||||
|
require.emit("./settings");
|
||||||
}());
|
}());
|
@ -10,10 +10,10 @@
|
|||||||
"background": {
|
"background": {
|
||||||
"scripts": [
|
"scripts": [
|
||||||
"lib/require.js",
|
"lib/require.js",
|
||||||
|
"lib/logging.js",
|
||||||
"lib/settingDefinitions.js",
|
"lib/settingDefinitions.js",
|
||||||
"lib/settingsMigration.js",
|
"lib/settingsMigration.js",
|
||||||
"lib/settings.js",
|
"lib/settings.js",
|
||||||
"lib/logging.js",
|
|
||||||
"lib/lists.js",
|
"lib/lists.js",
|
||||||
"lib/persistentRndStorage.js",
|
"lib/persistentRndStorage.js",
|
||||||
"lib/dataUrls.js",
|
"lib/dataUrls.js",
|
||||||
@ -28,11 +28,11 @@
|
|||||||
"run_at": "document_start",
|
"run_at": "document_start",
|
||||||
"js": [
|
"js": [
|
||||||
"lib/require.js",
|
"lib/require.js",
|
||||||
|
"lib/logging.js",
|
||||||
|
|
||||||
"lib/settingDefinitions.js",
|
"lib/settingDefinitions.js",
|
||||||
"lib/settings.js",
|
"lib/settings.js",
|
||||||
|
|
||||||
"lib/logging.js",
|
|
||||||
|
|
||||||
"lib/colorStatistics.js",
|
"lib/colorStatistics.js",
|
||||||
"lib/webgl.js",
|
"lib/webgl.js",
|
||||||
"lib/hash.js",
|
"lib/hash.js",
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
<body>
|
<body>
|
||||||
<textarea id="settings"></textarea>
|
<textarea id="settings"></textarea>
|
||||||
<script src="../lib/require.js"></script>
|
<script src="../lib/require.js"></script>
|
||||||
|
<script src="../lib/logging.js"></script>
|
||||||
<script src="../lib/settingDefinitions.js"></script>
|
<script src="../lib/settingDefinitions.js"></script>
|
||||||
<script src="../lib/settings.js"></script>
|
<script src="../lib/settings.js"></script>
|
||||||
<script src="../lib/logging.js"></script>
|
|
||||||
<script src="export.js"></script>
|
<script src="export.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -7,9 +7,9 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="../lib/require.js"></script>
|
<script src="../lib/require.js"></script>
|
||||||
|
<script src="../lib/logging.js"></script>
|
||||||
<script src="../lib/settingDefinitions.js"></script>
|
<script src="../lib/settingDefinitions.js"></script>
|
||||||
<script src="../lib/settings.js"></script>
|
<script src="../lib/settings.js"></script>
|
||||||
<script src="../lib/logging.js"></script>
|
|
||||||
<script src="optionsGui.js"></script>
|
<script src="optionsGui.js"></script>
|
||||||
<script src="settingsDisplay.js"></script>
|
<script src="settingsDisplay.js"></script>
|
||||||
<script src="options.js"></script>
|
<script src="options.js"></script>
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
<li>...</li>
|
<li>...</li>
|
||||||
</ul>
|
</ul>
|
||||||
<script src="../lib/require.js"></script>
|
<script src="../lib/require.js"></script>
|
||||||
|
<script src="../lib/logging.js"></script>
|
||||||
<script src="../lib/settingDefinitions.js"></script>
|
<script src="../lib/settingDefinitions.js"></script>
|
||||||
<script src="../lib/settings.js"></script>
|
<script src="../lib/settings.js"></script>
|
||||||
<script src="../lib/logging.js"></script>
|
|
||||||
<script src="../lib/lists.js"></script>
|
<script src="../lib/lists.js"></script>
|
||||||
<script src="../lib/callingStack.js"></script>
|
<script src="../lib/callingStack.js"></script>
|
||||||
<script src="gui.js"></script>
|
<script src="gui.js"></script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user