| Index: lib/ui.js |
| =================================================================== |
| --- a/lib/ui.js |
| +++ b/lib/ui.js |
| @@ -1088,8 +1088,8 @@ |
| let state = (Prefs.enabled ? "active" : "disabled"); |
| if (state == "active") |
| { |
| - let location = this.getCurrentLocation(window); |
| - if (location && Policy.isWhitelisted(location.spec)) |
| + let {getBrowser} = require("appSupport"); |
| + if (Policy.isWindowWhitelisted(getBrowser(window).contentWindow)) |
|
Wladimir Palant
2014/08/14 19:58:15
Please revert the changes in this file, the UI sho
Thomas Greiner
2014/08/29 15:57:29
Done.
|
| state = "whitelisted"; |
| } |
| @@ -1330,10 +1330,9 @@ |
| */ |
| removeWhitelist: function(/**Window*/ window) |
| { |
| - let location = this.getCurrentLocation(window); |
| let filter = null; |
| - if (location) |
| - filter = Policy.isWhitelisted(location.spec); |
| + let {getBrowser} = require("appSupport"); |
| + filter = Policy.isWindowWhitelisted(getBrowser(window).contentWindow); |
| if (filter && filter.subscriptions.length && !filter.disabled) |
| { |
| UI.toggleFilter(filter); |
| @@ -1682,8 +1681,8 @@ |
| } |
| // Add "Remove exception" menu item if necessary |
| - let location = this.getCurrentLocation(window); |
| - let filter = (location ? Policy.isWhitelisted(location.spec) : null); |
| + let {getBrowser} = require("appSupport"); |
| + let filter = Policy.isWindowWhitelisted(getBrowser(window).contentWindow); |
| if (filter && filter.subscriptions.length && !filter.disabled) |
| { |
| let label = this.overlay.attributes.whitelistcontextlabel; |