1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02:00

Persistent rng is no longer shared between containers

(different cookieStoreId)

Fixes #350
This commit is contained in:
kkapsner 2019-05-29 00:37:33 +02:00
parent 97e08d874a
commit 621106ffbf
5 changed files with 23 additions and 2 deletions

View file

@ -85,6 +85,11 @@
notice("my tab id is", data.tabId);
tabId = data.tabId;
}
if (data.hasOwnProperty("cookieStoreId")){
notice("my tab cookie store id is", data.cookieStoreId);
const {persistent: persistentRnd} = require("./randomSupplies");
persistentRnd.setCookieStoreId(data.cookieStoreId);
}
const persistentRndName = "persistent" + (extension.inIncognitoContext? "Incognito": "") + "Rnd";
if (data.hasOwnProperty(persistentRndName)){
const persistentRndValue = data[persistentRndName];