mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-03 10:31:54 +01:00
Made the domain rnd setable for the persistent rng.
This commit is contained in:
parent
07330cbdcf
commit
e5e38e148e
@ -25,8 +25,9 @@
|
||||
}
|
||||
return window.location.host;
|
||||
}
|
||||
const getPersistentRnd = (function(){
|
||||
|
||||
var persistentRnd = Object.create(null);
|
||||
const getPersistentRnd = (function(){
|
||||
|
||||
browser.runtime.onMessage.addListener(function(data){
|
||||
if (data["canvasBlocker-set-domain-rnd"]){
|
||||
@ -51,6 +52,9 @@
|
||||
}());
|
||||
scope.persistent = {
|
||||
name: "persistent",
|
||||
setDomainRnd: function(domain, rnd){
|
||||
persistentRnd[domain] = new Uint8Array(rnd);
|
||||
},
|
||||
getRng: function(length, window){
|
||||
var bitSet = getPersistentRnd(window);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user