1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 12:36:37 +02:00

Added preferences to display caller(s)

This commit is contained in:
kkapsner 2014-12-15 18:43:47 +01:00
parent a408a73629
commit 1c0dc233a9
6 changed files with 87 additions and 9 deletions

View file

@ -73,6 +73,16 @@
updateBlackList();
});
// preferences for injected file
var preferencesForInjected = ["showCallingFile", "showCompleteCallingStack"];
preferencesForInjected.forEach(function(name){
preferences.on(name, function(){
workers.forEach(function(worker){
worker.port.emit("set", name, prefs[name]);
});
});
});
function checkURL(url){
var url = new URL(url);
var mode = "block";
@ -155,6 +165,13 @@
});
worker.port.emit("setTranslation", "askForPermission", _("askForPermission"));
worker.port.emit("setTranslation", "askForReadoutPermission", _("askForReadoutPermission"));
worker.port.emit("setTranslation", "sourceOutput", _("sourceOutput"));
worker.port.emit("setTranslation", "stackEntryOutput", _("stackEntryOutput"));
preferencesForInjected.forEach(function(name){
worker.port.emit("set", name, prefs[name]);
});
checkWorker(worker);
},
});