From fe93f6763a83faad5c4a32572a9dc75af05f4ac6 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 14 Aug 2022 14:55:22 -0400 Subject: [PATCH] *Ensure we only ever run on a search --- src/webEngine.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/webEngine.ts b/src/webEngine.ts index ddaa57b..5baded8 100644 --- a/src/webEngine.ts +++ b/src/webEngine.ts @@ -203,23 +203,23 @@ export default class WebEngine { return; } - if ("google.com" === hostname) { - if ( - !( - originalUrl.searchParams.has("client") && - originalUrl.searchParams.get("client")?.includes("firefox") - ) - ) { - return; - } - } - if ("kernel.skynet" === hostname) { return; } if (getAuthStatus().loginComplete !== true) { return; } + if ("google.com" !== hostname) { + return; + } + if ( + !( + originalUrl.searchParams.has("client") && + originalUrl.searchParams.get("client")?.includes("firefox") + ) + ) { + return; + } let queriedUrl = originalUrl.searchParams.get("q") as string; let queriedHost = queriedUrl;