Commit f1a84a37 authored by Thomas Greiner's avatar Thomas Greiner

Issue #380 - Adapted code to work with updated Matcher.matchesAny()

parent 88a1fad1
......@@ -456,14 +456,13 @@
// See also https://hg.adblockplus.org/adblockpluscore/file/56c681657836/lib/notification.js#l301
if (notification.urlFilters instanceof Array)
{
const {url} = message;
let {url} = message;
if (!url)
return;
let host;
try
{
host = new URL(url).hostname;
url = new URL(url);
}
catch (e)
{
......@@ -477,7 +476,7 @@
}
const {DOCUMENT} = RegExpFilter.typeMap;
if (!matcher.matchesAny(url, DOCUMENT, host, false, null))
if (!matcher.matchesAny(url, DOCUMENT, url.hostname))
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment