From ad4c00e663d8451557a4b77520c97b656fb23439 Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Sat, 10 Dec 2022 10:48:21 +0300 Subject: Revert "Added Url Parameters support for Invidious, Piped https://github.com/libredirect/libredirect/issues/491" This reverts commit 2a738e883c5c48207a1f9e737feb3ce53fdd969b. --- src/assets/javascripts/services.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/assets/javascripts/services.js') diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index 0b418f91..c59e4344 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -97,9 +97,6 @@ function redirect(url, type, initiator, forceRedirection) { break } if (!frontend || !randomInstance) return - let randomInstanceURL = new URL(randomInstance); - let allParams = randomInstanceURL.searchParams - url.searchParams.forEach((value, key) => allParams.append(key, value)) // Here is a (temperory) space for defining constants required in 2 or more switch cases. // When possible, try have the two switch cases share all their code as done with searx and searxng. @@ -119,6 +116,7 @@ function redirect(url, type, initiator, forceRedirection) { } return [zoom, lon, lat] } + console.log(frontend) switch (frontend) { // This is where all instance-specific code must be ran to convert the service url to one that can be understood by the frontend. case "beatbump": @@ -449,11 +447,8 @@ function redirect(url, type, initiator, forceRedirection) { return `${randomInstance}${url.pathname}${url.search}` case "simpleertube": return `${randomInstance}/${url.hostname}${url.pathname}${url.search}` - case "invidious": - case "piped": - return `${utils.protocolHost(randomInstanceURL)}${url.pathname}?${allParams.toString()}` default: - return `${randomInstance}${url.pathname}${url.search}` + return `${randomInstance}${url.pathname}${url.search} ` } } -- cgit 1.4.1