mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-03-13 11:44:12 +01:00
Added logging to dynamic content script.
This commit is contained in:
parent
140349b401
commit
96b5291459
@ -84,7 +84,6 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (browser.contentScripts){
|
if (browser.contentScripts){
|
||||||
let unregister = function(){};
|
let unregister = function(){};
|
||||||
let lastRegistering;
|
let lastRegistering;
|
||||||
@ -105,7 +104,13 @@
|
|||||||
js: [{
|
js: [{
|
||||||
code: `(function(){
|
code: `(function(){
|
||||||
const settings = require("./settings");
|
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){
|
}).then(function(api){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user