diff options
author | ManeraKai <manerakai@protonmail.com> | 2024-09-15 07:03:24 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2024-09-15 07:03:24 +0300 |
commit | ae3ae00cb7a622a2c0a3fd053c78b3f1b73117fd (patch) | |
tree | 0e4b738a49535bf51ee2c1dc141e2997ac2486c4 | |
parent | Made Show in popup always toggleable https://github.com/libredirect/browser_e... (diff) | |
download | libredirect-ae3ae00cb7a622a2c0a3fd053c78b3f1b73117fd.zip |
Fixed last slash bug when adding a custom instance https://github.com/libredirect/browser_extension/issues/996
-rw-r--r-- | src/assets/javascripts/utils.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/assets/javascripts/utils.js b/src/assets/javascripts/utils.js index e5b8ba46..d81a96bc 100644 --- a/src/assets/javascripts/utils.js +++ b/src/assets/javascripts/utils.js @@ -31,7 +31,8 @@ function protocolHost(url) { if (url.pathname == "/TekstoLibre/" && url.host.endsWith("github.io")) return `${url.protocol}//${url.host}${url.pathname.slice(0, -1)}` - return `${url.protocol}//${url.host}${url.pathname}` + const pathname = url.pathname != "/" ? url.pathname : "" + return `${url.protocol}//${url.host}${pathname}` } /** |