mirror of
https://github.com/classilla/tenfourfox.git
synced 2025-01-23 03:32:39 +00:00
14 lines
428 B
JavaScript
14 lines
428 B
JavaScript
Components.utils.import("resource://gre/modules/Services.jsm");
|
|
|
|
var permChangedObs = {
|
|
observe: function(subject, topic, data) {
|
|
if (topic == 'perm-changed') {
|
|
var permission = subject.QueryInterface(Components.interfaces.nsIPermission);
|
|
var msg = { op: data, type: permission.type };
|
|
sendAsyncMessage('perm-changed', msg);
|
|
}
|
|
}
|
|
};
|
|
|
|
Services.obs.addObserver(permChangedObs, 'perm-changed', false);
|