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,