mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-18 17:38:46 +01:00
Removed updateContentScripts
It does not to seem necessary any more.
This commit is contained in:
parent
3cb1974b18
commit
e539a893b4
18
lib/main.js
18
lib/main.js
@ -16,21 +16,6 @@
|
|||||||
settings.onloaded(function(){
|
settings.onloaded(function(){
|
||||||
notice("everything loaded");
|
notice("everything loaded");
|
||||||
|
|
||||||
function updateContentScripts(){
|
|
||||||
message("update content scripts");
|
|
||||||
notice("build settings blob");
|
|
||||||
var settingsBlob = new Blob(
|
|
||||||
[
|
|
||||||
"var settings = " + JSON.stringify(settings) + ";",
|
|
||||||
"var persistentRnd = " + JSON.stringify(persistentRnd) + ";"
|
|
||||||
],
|
|
||||||
{
|
|
||||||
type: "text/javascript"
|
|
||||||
}
|
|
||||||
);
|
|
||||||
warning("TODO: register content scripts -> have to wait for the API to be released");
|
|
||||||
}
|
|
||||||
updateContentScripts();
|
|
||||||
persistentRndStorage.init();
|
persistentRndStorage.init();
|
||||||
|
|
||||||
message("register non port message listener");
|
message("register non port message listener");
|
||||||
@ -45,14 +30,12 @@
|
|||||||
if (keys.length === 1){
|
if (keys.length === 1){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
updateContentScripts();
|
|
||||||
}
|
}
|
||||||
if (data["canvasBlocker-clear-domain-rnd"]){
|
if (data["canvasBlocker-clear-domain-rnd"]){
|
||||||
persistentRndStorage.clear();
|
persistentRndStorage.clear();
|
||||||
if (keys.length === 1){
|
if (keys.length === 1){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
updateContentScripts();
|
|
||||||
}
|
}
|
||||||
notice("pass the message to the tabs");
|
notice("pass the message to the tabs");
|
||||||
browser.tabs.query({}).then(function(tabs){
|
browser.tabs.query({}).then(function(tabs){
|
||||||
@ -87,7 +70,6 @@
|
|||||||
|
|
||||||
message("register storage change event listener");
|
message("register storage change event listener");
|
||||||
|
|
||||||
settings.on("any", updateContentScripts);
|
|
||||||
settings.on("showNotifications", function({newValue}){
|
settings.on("showNotifications", function({newValue}){
|
||||||
if (!newValue){
|
if (!newValue){
|
||||||
message("notifications were disabled -> hide all page actions");
|
message("notifications were disabled -> hide all page actions");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user