Skip to content

Commit 524d98f

Browse files
committed
add missing hash when pushstate to double slash
1 parent f06c096 commit 524d98f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/wombat-handler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// rewrite url /main/https:/google.com /main/https://google.com without refreshing the page
33
var rewriteDoubleSlash = window.location.pathname.match(/\/main(?<mod>\/[^\/_]+_)?(?<url_preslash>\/(?:http|ws)s?:\/)(?<url_postslash>[^\/].*)/);
44
if (rewriteDoubleSlash) {
5-
window.history.pushState(null, null, '/main' + (rewriteDoubleSlash.groups.mod || '') + rewriteDoubleSlash.groups.url_preslash + '/' + rewriteDoubleSlash.groups.url_postslash);
5+
window.history.pushState(null, null, '/main' + (rewriteDoubleSlash.groups.mod || '') + rewriteDoubleSlash.groups.url_preslash + '/' + rewriteDoubleSlash.groups.url_postslash + window.location.hash);
66
}
77
var mergeDoubleSlash = function (url) {
88
// only merge if server forcefully merges and url is not a blob or data

0 commit comments

Comments
 (0)