From bad5e26a86712ce93f1f85cef42d1c74f14f9be3 Mon Sep 17 00:00:00 2001 From: Sneed Group Holder Date: Mon, 25 Nov 2024 14:21:10 -0600 Subject: [PATCH] re-introduce yt/google redirect --- libbrowz.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libbrowz.js b/libbrowz.js index 581c246..af0ca2d 100644 --- a/libbrowz.js +++ b/libbrowz.js @@ -45,7 +45,10 @@ function go() { browserFrame = tabGroup.getActiveTab().webview let browser = tabGroup.getActiveTab() url = normalizeUrl(document.getElementById("txtUrl").value) - if (url.includes("google.com/search?q") || url.includes("google.com/?q")) { + if (url.includes("youtube.com") || url.includes("youtu.be")) { + url = url.replaceAll("youtube.com", "invidious.nerdvpn.de") + url = url.replaceAll("youtu.be", "invidious.nerdvpn.de") + } else if (url.includes("google.com/search?q") || url.includes("google.com/?q")) { // Define the URL object const serachUrlObj = new URL(url); //Get query from old url @@ -55,6 +58,8 @@ function go() { url = searchPattern.replaceAll("!!!QUERY!!!", query) } 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") && !url.includes("webstore") && !url.includes("in") && !url.includes("on") && !url.includes("jp")) { + url = url.replaceAll("google.com", "search.sparksammy.com") } document.getElementById("txtUrl").value = "" browserFrame.loadURL(url,