about summary refs log tree commit diff stats
path: root/src/pages
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2024-05-20 14:34:18 +0300
committerManeraKai <manerakai@protonmail.com>2024-05-20 14:34:18 +0300
commitabcd566305d0ede82bf81c4809fd59ea7c67591c (patch)
treec2dda909ce789357056e6ccca2064666bdf30880 /src/pages
parentFixed timestamps being removed for invidious https://github.com/libredirect/b... (diff)
downloadlibredirect-abcd566305d0ede82bf81c4809fd59ea7c67591c.zip
Removed ?si= from youtube frontends https://github.com/libredirect/browser_extension/issues/922
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/background/background.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pages/background/background.js b/src/pages/background/background.js
index 3df43b52..0754f8a5 100644
--- a/src/pages/background/background.js
+++ b/src/pages/background/background.js
@@ -32,6 +32,7 @@ let tabIdRedirects = {}
 browser.webRequest.onBeforeRequest.addListener(
 	details => {
 		const url = new URL(details.url)
+		const old_href = url.href
 		if (new RegExp(/^chrome-extension:\/{2}.*\/instances\/.*.json$/).test(url.href) && details.type == "xmlhttprequest") return
 		let initiator
 		try {
@@ -71,7 +72,7 @@ browser.webRequest.onBeforeRequest.addListener(
 				if (tabIdRedirects[details.tabId] != false) tabIdRedirects[details.tabId] = false
 				return null
 			}
-			console.log("Redirecting", url.href, "=>", newUrl)
+			console.log("Redirecting", old_href, "=>", newUrl)
 			return { redirectUrl: newUrl }
 		}
 		return null