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:
parent
a408a73629
commit
1c0dc233a9
6 changed files with 87 additions and 9 deletions
17
lib/main.js
17
lib/main.js
|
@ -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);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue