aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/document-blocked.js
diff options
context:
space:
mode:
authorgorhill <rhill@raymondhill.net>2015-06-13 11:21:55 -0400
committergorhill <rhill@raymondhill.net>2015-06-13 11:21:55 -0400
commit9a5404ef07237dd8b7f45054ccd50fc13a360aae (patch)
treedbc8e20316cfd3eb68adf373e2fee0447a33c943 /src/js/document-blocked.js
parentdaef0bd8c8b45d8c9c734d51a930367c511fa881 (diff)
downloaduBlock-9a5404ef07237dd8b7f45054ccd50fc13a360aae.zip
uBlock-9a5404ef07237dd8b7f45054ccd50fc13a360aae.tar.gz
uBlock-9a5404ef07237dd8b7f45054ccd50fc13a360aae.tar.bz2
this fixes the other half of #58: from which list(s) a cosmetic filter originates
Diffstat (limited to 'src/js/document-blocked.js')
-rw-r--r--src/js/document-blocked.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/js/document-blocked.js b/src/js/document-blocked.js
index dc0b145..306bcd9 100644
--- a/src/js/document-blocked.js
+++ b/src/js/document-blocked.js
@@ -44,7 +44,18 @@ var details = {};
(function() {
var onReponseReady = function(response) {
- var lists = response.matches;
+ if ( typeof response !== 'object' ) {
+ return;
+ }
+ var lists;
+ for ( var rawFilter in response ) {
+ if ( response.hasOwnProperty(rawFilter) === false ) {
+ continue;
+ }
+ lists = response[rawFilter];
+ break;
+ }
+
if ( Array.isArray(lists) === false || lists.length === 0 ) {
return;
}
@@ -72,8 +83,9 @@ var details = {};
};
messager.send({
- what: 'reverseLookupFilter',
- filter: details.fc
+ what: 'listsFromNetFilter',
+ compiledFilter: details.fc,
+ rawFilter: details.fs
}, onReponseReady);
})();