mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 12:50:36 +01:00
Added logging to dynamic content script.
This commit is contained in:
parent
140349b401
commit
96b5291459
@ -84,7 +84,6 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (browser.contentScripts){
|
||||
let unregister = function(){};
|
||||
let lastRegistering;
|
||||
@ -105,7 +104,13 @@
|
||||
js: [{
|
||||
code: `(function(){
|
||||
const settings = require("./settings");
|
||||
settings.init(${JSON.stringify(data)});
|
||||
const logging = require("./logging");
|
||||
if (settings.init(${JSON.stringify(data)})){
|
||||
logging.message("Initiaized settings by dynamic content script.");
|
||||
}
|
||||
else {
|
||||
logging.error("Dynamic content script was too late to provide settings.");
|
||||
}
|
||||
}())`
|
||||
}]
|
||||
}).then(function(api){
|
||||
|
Loading…
x
Reference in New Issue
Block a user