Index: lib/notification.js |
=================================================================== |
--- a/lib/notification.js |
+++ b/lib/notification.js |
@@ -219,21 +219,9 @@ |
{ |
if (Prefs.enabled && typeof url === "string" && notification.urlFilters instanceof Array) |
{ |
- let host; |
- if (typeof URL == "function") |
- host = new URL(url).hostname; |
- else |
- { |
- try |
- { |
- host = Services.io.newURI(url, null, null).host; |
- } |
- catch (e) |
- { |
- // Ignore, an exception is expected for about: and similar schemes |
- host = ""; |
- } |
- } |
+ let uri = Utils.makeURI(url); |
Sebastian Noack
2016/04/04 11:19:46
Utils.makeURI() wraps Services.io.newURI() and ret
Wladimir Palant
2016/04/04 12:57:36
Actually, it is better to use `new URL` unconditio
Sebastian Noack
2016/04/04 13:40:38
Awesome. New patch set is up.
|
+ let host = uri && uri.host || ""; |
+ |
let exception = defaultMatcher.matchesAny(url, RegExpFilter.typeMap.DOCUMENT, host, false, null); |
if (exception instanceof WhitelistFilter) |
continue; |