1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00

Added some logging to frame script.

This commit is contained in:
kkapsner 2017-07-16 00:25:19 +02:00
parent 788152d06c
commit 736d6b0fb2

View File

@ -55,6 +55,8 @@
prefs
});
}
log("open port to background script");
var port = browser.runtime.connect();
var tabId;
port.onMessage.addListener(function(data){
@ -80,6 +82,8 @@
if (!enabled || interceptedWindows.get(window)){
return false;
}
log("intercepting window", window);
intercept(
{subject: window},
{check, checkStack, ask: askWrapper, notify, prefs}
@ -122,6 +126,7 @@
interceptWindow(window);
log("register listener for messages from background script");
browser.runtime.onMessage.addListener(function(data){
if (data["canvasBlocker-unload"]){
enabled = false;
@ -134,7 +139,7 @@
}
});
log("register listener for settings changes");
browser.storage.onChanged.addListener(function(change, area){
if (area === "local"){
Object.keys(change).forEach(function(key){