mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Remove duplicated code
This commit is contained in:
parent
64b60c834a
commit
6fbb9339a1
6 changed files with 59 additions and 96 deletions
|
@ -123,16 +123,7 @@
|
|||
|
||||
return function getPersistentRnd(window){
|
||||
while (cookieStoreId === false){
|
||||
logging.message("Starting synchronous request to wait for cookie store id.");
|
||||
try {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "https://[::]", false);
|
||||
xhr.send();
|
||||
xhr = null;
|
||||
}
|
||||
catch (error){
|
||||
logging.verbose("Error in XHR:", error);
|
||||
}
|
||||
extension.waitSync("to wait for cookie store id");
|
||||
}
|
||||
const domain = cookieStoreId + getDomain(window);
|
||||
if (!persistentRnd[domain]){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue