mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 04:26:35 +02:00
parent
b3bb10d334
commit
41d9b7073f
1 changed files with 13 additions and 4 deletions
17
lib/frame.js
17
lib/frame.js
|
@ -141,10 +141,6 @@
|
|||
return true;
|
||||
}
|
||||
|
||||
settings.onloaded(function(){
|
||||
interceptWindow(window);
|
||||
});
|
||||
|
||||
message("register listener for messages from background script");
|
||||
browser.runtime.onMessage.addListener(function(data){
|
||||
if (data["canvasBlocker-unload"]){
|
||||
|
@ -162,4 +158,17 @@
|
|||
notice("notifications sent");
|
||||
}
|
||||
});
|
||||
|
||||
// need to wait for the settings to arrive!
|
||||
while (settings.isStillDefault){
|
||||
logging.message("Starting synchronous request to wait for settings.");
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", browser.extension.getURL("releaseNotes.txt"), false);
|
||||
xhr.send();
|
||||
logging.message("settings still default?", settings.isStillDefault);
|
||||
}
|
||||
|
||||
settings.onloaded(function(){
|
||||
interceptWindow(window);
|
||||
});
|
||||
}());
|
Loading…
Add table
Add a link
Reference in a new issue