blob: efc017099b25dd1f8a61ceac97cd4bb5e1e9de47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
/* eslint-env mozilla/chrome-script */
var permChangedObs = {
observe(subject, topic, data) {
if (topic == "perm-changed") {
var permission = subject.QueryInterface(Ci.nsIPermission);
var msg = { op: data, type: permission.type };
sendAsyncMessage("perm-changed", msg);
}
},
};
Services.obs.addObserver(permChangedObs, "perm-changed");
|