Index: lib/notification.js |
=================================================================== |
--- a/lib/notification.js |
+++ b/lib/notification.js |
@@ -220,20 +220,15 @@ |
if (Prefs.enabled && typeof url === "string" && notification.urlFilters instanceof Array) |
{ |
let host; |
- if (typeof URL == "function") |
- host = new URL(url).hostname; |
- else |
+ try |
{ |
- try |
- { |
- host = Services.io.newURI(url, null, null).host; |
- } |
- catch (e) |
- { |
- // Ignore, an exception is expected for about: and similar schemes |
- host = ""; |
- } |
+ host = new URL(url).host; |
} |
+ catch (e) |
+ { |
+ host = ""; |
+ } |
+ |
let exception = defaultMatcher.matchesAny(url, RegExpFilter.typeMap.DOCUMENT, host, false, null); |
if (exception instanceof WhitelistFilter) |
continue; |