From 252984a504e8985af4f4af3343f1e5290fda2cfe Mon Sep 17 00:00:00 2001 From: Sam Sneed <163201376+sam-sneed@users.noreply.github.com> Date: Tue, 13 Aug 2024 18:12:36 -0500 Subject: [PATCH] modified: libbrowz.js --- libbrowz.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libbrowz.js b/libbrowz.js index 4ff2993..a0ed1d8 100644 --- a/libbrowz.js +++ b/libbrowz.js @@ -51,12 +51,13 @@ function go() { url = url.replaceAll("youtube.com", "invidious.nerdvpn.de") url = url.replaceAll("youtu.be", "invidious.nerdvpn.de") } else if (url.includes("google.com/?q")) { - // Define the regex pattern - const pattern = /https:\/\/www\.google\.com\/search\?q=([^&]+)/; - // Define the replacement URL - const replacement = "https://search.sparksammy.com/search.php?q=$1&p=0&t=0"; - // Perform the replacement - url = url.replace(pattern, replacement); + // Define the regex pattern + const pattern = /https:\/\/www\.google\.com\/search\?q=([^&]+)/; + // Define the replacement URL + const replacement = "https://search.sparksammy.com/search.php?q=$1&p=0&t=0"; + // Perform the replacement + url = url.replace(pattern, replacement); + console.log(url) } else if (url.includes("https://news.google.com")) { url = url.replaceAll("https://news.google.com", "http://68k.news") } else if (url.includes("google.com") && !url.includes("maps") && !url.includes("news") && !url.includes("webstore") && !url.includes("drive") && !url.includes("docs") && !url.includes("sheets") && !url.includes("slides") && !url.includes("mail")) {