Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: adblockplus/Api.jsm

Issue 29372803: Issue 4774 - 'Block ads on this page' does not remove whitelisting when re-selected (Closed)
Patch Set: Created Jan. 20, 2017, 11:51 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: adblockplus/Api.jsm
===================================================================
--- a/adblockplus/Api.jsm
+++ b/adblockplus/Api.jsm
@@ -31,17 +31,17 @@ let XMLHttpRequest = Components.Construc
function require(module)
{
let result = {};
result.wrappedJSObject = result;
Services.obs.notifyObservers(result, "adblockplus-require", module);
return result.exports;
}
-let {Filter} = require("filterClasses");
+let {Filter, RegExpFilter} = require("filterClasses");
let {FilterNotifier} = require("filterNotifier");
let {FilterStorage} = require("filterStorage");
let {defaultMatcher} = require("matcher");
let {Prefs} = require("prefs");
let {Subscription, SpecialSubscription, RegularSubscription, DownloadableSubscription, ExternalSubscription} = require("subscriptionClasses");
let {Synchronizer} = require("synchronizer");
let {UI} = require("ui");
@@ -98,17 +98,17 @@ function getPrefsBranch()
}
function getWhitelistingFilter(url)
{
let uriObject = Services.io.newURI(url, null, null);
try
{
return defaultMatcher.whitelist.matchesAny(
- uriObject.spec, "DOCUMENT", uriObject.host, false, null);
+ uriObject.spec, RegExpFilter.typeMap.DOCUMENT, uriObject.host, false, null, false);
}
catch (e)
{
return null;
}
}
var AdblockPlusApi =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld