From ff3a3b14b1864b934704bd36bbb239c7d755868a Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 7 Apr 2015 22:22:12 -0600 Subject: [PATCH] Completes fix for #1208 --- src/js/messaging.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/js/messaging.js b/src/js/messaging.js index 98fd3534c..6249a22b8 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -485,14 +485,19 @@ var onMessage = function(details, sender, callback) { // Sync var response; - var pageStore; + var pageStore, frameStore = false; if ( sender && sender.tab ) { pageStore = µb.pageStoreFromTabId(sender.tab.id); + var frameId = sender.frameId; + if(frameId && frameId > 0) { + frameStore = pageStore.getFrame(frameId); + } } switch ( details.what ) { case 'retrieveGenericCosmeticSelectors': - if ( pageStore && pageStore.getGenericCosmeticFilteringSwitch() ) { + if ( pageStore && pageStore.getGenericCosmeticFilteringSwitch() + && (!frameStore || frameStore.getNetFilteringSwitch()) ) { response = µb.cosmeticFilteringEngine.retrieveGenericSelectors(details); } break; @@ -841,6 +846,8 @@ var onMessage = function(request, sender, callback) { case 'setWhitelist': µb.netWhitelist = µb.whitelistFromString(request.whitelist); µb.saveWhitelist(); + // #1208 + µb.cosmeticFilteringEngine.removeFromSelectorCache('*'); break; default: