| 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)) | 
| 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; | 
|  |