mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 12:50:36 +01:00
Added more logging to frame script.
This commit is contained in:
parent
3c47eaf97f
commit
c8b451cf2f
@ -98,6 +98,7 @@
|
||||
{subject: window},
|
||||
{check, checkStack, ask: askWrapper, notify, prefs}
|
||||
);
|
||||
log("prepare to intercept (i)frames.");
|
||||
|
||||
[window.HTMLIFrameElement, window.HTMLFrameElement].forEach(function(constructor){
|
||||
var oldContentWindowGetter = constructor.prototype.__lookupGetter__("contentWindow");
|
||||
@ -142,13 +143,16 @@
|
||||
enabled = false;
|
||||
}
|
||||
if (data.hasOwnProperty("canvasBlocker-sendNotifications") && data["canvasBlocker-sendNotifications"] === tabId){
|
||||
log("sending notifications:", notifications);
|
||||
browser.runtime.sendMessage({
|
||||
sender: tabId,
|
||||
"canvasBlocker-notifications": notifications
|
||||
});
|
||||
log("notifications sent");
|
||||
}
|
||||
});
|
||||
|
||||
log("load settings");
|
||||
browser.storage.local.get().then(function(data){
|
||||
Object.keys(data).forEach(function(key){
|
||||
log("loaded setting:", key, ":", data[key]);
|
||||
@ -160,6 +164,7 @@
|
||||
browser.storage.onChanged.addListener(function(change, area){
|
||||
if (area === "local"){
|
||||
Object.keys(change).forEach(function(key){
|
||||
log("setting changed:", key, ":", change[key].newValue);
|
||||
settings[key] = change[key].newValue;
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user