diff --git a/lib/randomSupplies.js b/lib/randomSupplies.js index 617c4f0..0c5b95b 100644 --- a/lib/randomSupplies.js +++ b/lib/randomSupplies.js @@ -25,8 +25,9 @@ } return window.location.host; } + + var persistentRnd = Object.create(null); const getPersistentRnd = (function(){ - var persistentRnd = Object.create(null); 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);