diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-10-24 11:13:33 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-10-24 11:13:33 +0200 |
commit | 579881ffb4aa0b145c793825cd1b0628e7cd6cdc (patch) | |
tree | 65d59fc6b73f120ac1bc2214d4a8442421076b04 /application/palemoon/components/nsBrowserGlue.js | |
parent | a02c44648a3f7d6f3904eebba026ce5e6f781bef (diff) | |
parent | f71c04d814416ebf52dd54109f2d04f1cbd397c0 (diff) | |
download | UXP-579881ffb4aa0b145c793825cd1b0628e7cd6cdc.tar UXP-579881ffb4aa0b145c793825cd1b0628e7cd6cdc.tar.gz UXP-579881ffb4aa0b145c793825cd1b0628e7cd6cdc.tar.lz UXP-579881ffb4aa0b145c793825cd1b0628e7cd6cdc.tar.xz UXP-579881ffb4aa0b145c793825cd1b0628e7cd6cdc.zip |
Merge branch 'master' into Sync-weave
Diffstat (limited to 'application/palemoon/components/nsBrowserGlue.js')
-rw-r--r-- | application/palemoon/components/nsBrowserGlue.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/application/palemoon/components/nsBrowserGlue.js b/application/palemoon/components/nsBrowserGlue.js index 720d1165c..f0a7aa22a 100644 --- a/application/palemoon/components/nsBrowserGlue.js +++ b/application/palemoon/components/nsBrowserGlue.js @@ -152,6 +152,9 @@ BrowserGlue.prototype = { // nsIObserver implementation observe: function BG_observe(subject, topic, data) { switch (topic) { + case "notifications-open-settings": + this._openPermissions(subject); + break; case "prefservice:after-app-defaults": this._onAppDefaults(); break; @@ -322,6 +325,7 @@ BrowserGlue.prototype = { // initialization (called on application startup) _init: function BG__init() { let os = Services.obs; + os.addObserver(this, "notifications-open-settings", false); os.addObserver(this, "prefservice:after-app-defaults", false); os.addObserver(this, "final-ui-startup", false); os.addObserver(this, "browser-delayed-startup-finished", false); @@ -354,6 +358,7 @@ BrowserGlue.prototype = { // cleanup (called on application shutdown) _dispose: function BG__dispose() { let os = Services.obs; + os.removeObserver(this, "notifications-open-settings"); os.removeObserver(this, "prefservice:after-app-defaults"); os.removeObserver(this, "final-ui-startup"); os.removeObserver(this, "sessionstore-windows-restored"); @@ -1484,6 +1489,16 @@ BrowserGlue.prototype = { } }, + _openPermissions: function(aPrincipal) { + var win = this.getMostRecentBrowserWindow(); + var url = "about:permissions"; + try { + url = url + "?filter=" + aPrincipal.URI.host; + } + catch (e) {} + win.openUILinkIn(url, "tab"); + }, + _hasSystemAlertsService: function() { try { return !!Cc["@mozilla.org/system-alerts-service;1"].getService( |