From 1ef168cd9efe9a9c4938e2369eb850be8c42e375 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 22 Aug 2022 01:50:26 -0400 Subject: [PATCH] *check hostname not url --- src/webEngine.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/webEngine.ts b/src/webEngine.ts index f128c9a..8ed601e 100644 --- a/src/webEngine.ts +++ b/src/webEngine.ts @@ -195,13 +195,13 @@ export default class WebEngine { return; } - if (!isDomain(details.url) || isIp(details.url)) { - return; - } - const originalUrl = new URL(details.url); const hostname = normalizeDomain(originalUrl.hostname); + if (!isDomain(hostname) || isIp(hostname)) { + return; + } + if (["chrome:"].includes(originalUrl.protocol)) { return; }