mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
parent
ab42c76a44
commit
eb6494eca5
3 changed files with 30 additions and 4 deletions
14
lib/main.js
14
lib/main.js
|
@ -38,6 +38,20 @@
|
|||
processes.port.emit("canvasBlocker-unload");
|
||||
});
|
||||
|
||||
// persistent rng
|
||||
const persistentRnd = Object.create(null);
|
||||
processes.port.on("canvasBlocker-new-domain-rnd", function(process, data){
|
||||
processes.port.emit("canvasBlocker-set-domain-rnd", data);
|
||||
persistentRnd[data.domain] = data.rnd;
|
||||
});
|
||||
processes.on("attach", function(process){
|
||||
if (process.isRemote){
|
||||
for (var name in persistentRnd){
|
||||
process.port.emit("canvasBlocker-set-domain-rnd", {domain: name, rnd: persistentRnd[name]});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// show release notes
|
||||
var data = require("sdk/self").data;
|
||||
preferences.on("showReleaseNotes", function(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue