| Index: lib/elemHideFF.js |
| =================================================================== |
| --- a/lib/elemHideFF.js |
| +++ b/lib/elemHideFF.js |
| @@ -44,41 +44,38 @@ FilterNotifier.on("elemhideupdate", () = |
| port.on("getUnconditionalSelectors", () => |
| { |
| return [ |
| ElemHide.getUnconditionalSelectors(), |
| ElemHide.getUnconditionalFilterKeys() |
| ]; |
| }); |
| -port.on("getSelectorsForDomain", domain => |
| +port.on("getSelectorsForDomain", ([domain, specificOnly]) => |
| { |
| - return ElemHide.getSelectorsForDomain(domain, ElemHide.NO_UNCONDITIONAL, |
| - true); |
| + let type = specificOnly ? ElemHide.SPECIFIC_ONLY : ElemHide.NO_UNCONDITIONAL; |
| + return ElemHide.getSelectorsForDomain(domain, type, true); |
| }); |
| port.on("elemhideEnabled", ({frames, isPrivate}) => |
| { |
| if (!Prefs.enabled) |
| return {enabled: false}; |
| let hit = Policy.isFrameWhitelisted(frames, true); |
| if (hit) |
| { |
| let [frameIndex, contentType, docDomain, thirdParty, location, filter] = hit; |
| - if (contentType != "GENERICHIDE") |
| - { |
| - if (!isPrivate) |
| - FilterStorage.increaseHitCount(filter); |
| - return { |
| - enabled: false, |
| - contentType, docDomain, thirdParty, location, |
| - filter: filter.text, filterType: filter.type |
| - }; |
| - } |
| + if (!isPrivate) |
| + FilterStorage.increaseHitCount(filter); |
| + return { |
| + enabled: contentType == "GENERICHIDE", |
| + contentType, docDomain, thirdParty, location, |
| + filter: filter.text, filterType: filter.type |
| + }; |
| } |
| return {enabled: true}; |
| }); |
| port.on("registerElemHideHit", ({key, frames, isPrivate}) => |
| { |
| let filter = ElemHide.getFilterByKey(key); |