re-introduce yt/google redirect
This commit is contained in:
parent
42de741e08
commit
bad5e26a86
1 changed files with 6 additions and 1 deletions
|
@ -45,7 +45,10 @@ function go() {
|
||||||
browserFrame = tabGroup.getActiveTab().webview
|
browserFrame = tabGroup.getActiveTab().webview
|
||||||
let browser = tabGroup.getActiveTab()
|
let browser = tabGroup.getActiveTab()
|
||||||
url = normalizeUrl(document.getElementById("txtUrl").value)
|
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
|
// Define the URL object
|
||||||
const serachUrlObj = new URL(url);
|
const serachUrlObj = new URL(url);
|
||||||
//Get query from old url
|
//Get query from old url
|
||||||
|
@ -55,6 +58,8 @@ function go() {
|
||||||
url = searchPattern.replaceAll("!!!QUERY!!!", query)
|
url = searchPattern.replaceAll("!!!QUERY!!!", query)
|
||||||
} else if (url.includes("https://news.google.com")) {
|
} else if (url.includes("https://news.google.com")) {
|
||||||
url = url.replaceAll("https://news.google.com", "http://68k.news")
|
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 = ""
|
document.getElementById("txtUrl").value = ""
|
||||||
browserFrame.loadURL(url,
|
browserFrame.loadURL(url,
|
||||||
|
|
Loading…
Reference in a new issue