mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-28 19:10:22 -05:00
[Glitch] Fix /web
redirecting to /web/web
in web UI
Port 0f07218e53
to glitch-soc
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
parent
85933bc9ff
commit
2f2b48b227
@ -12,7 +12,7 @@ function main() {
|
|||||||
if (window.history && history.replaceState) {
|
if (window.history && history.replaceState) {
|
||||||
const { pathname, search, hash } = window.location;
|
const { pathname, search, hash } = window.location;
|
||||||
const path = pathname + search + hash;
|
const path = pathname + search + hash;
|
||||||
if (!(/^\/web[$/]/).test(path)) {
|
if (!(/^\/web($|\/)/).test(path)) {
|
||||||
history.replaceState(null, document.title, `/web${path}`);
|
history.replaceState(null, document.title, `/web${path}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user