mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
parent
ba8f35a9a8
commit
ce7dc1b422
4 changed files with 103 additions and 23 deletions
21
lib/frame.js
21
lib/frame.js
|
@ -5,7 +5,7 @@
|
|||
"use strict";
|
||||
|
||||
const settings = require("./settings");
|
||||
const {intercept} = require("./intercept.js");
|
||||
const {preIntercept: intercept} = require("./intercept.js");
|
||||
const {ask} = require("./askForPermission.js");
|
||||
const lists = require("./lists.js");
|
||||
const {check: originalCheck, checkStack: originalCheckStack} = require("./check.js");
|
||||
|
@ -163,22 +163,5 @@
|
|||
}
|
||||
});
|
||||
|
||||
// need to wait for the settings to arrive!
|
||||
while (settings.isStillDefault){
|
||||
logging.message("Starting synchronous request to wait for settings.");
|
||||
try {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "https://[::]", false);
|
||||
xhr.send();
|
||||
xhr = null;
|
||||
}
|
||||
catch (e){
|
||||
logging.verbose("Error in XHR:", e);
|
||||
}
|
||||
logging.message("settings still default?", settings.isStillDefault);
|
||||
}
|
||||
|
||||
settings.onloaded(function(){
|
||||
interceptWindow(window);
|
||||
});
|
||||
interceptWindow(window);
|
||||
}());
|
Loading…
Add table
Add a link
Reference in a new issue