Fixed last slash bug when adding a custom instance https://github.com/libredirect/browser_extension/issues/996
This commit is contained in:
parent
ef4bc14882
commit
ae3ae00cb7
|
@ -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}`
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue