Revert to original URL behavior

This commit is contained in:
Hri7566 2024-07-12 18:18:23 -04:00
parent c15dee967b
commit c7344e1bd9
1 changed files with 3 additions and 3 deletions

View File

@ -1144,8 +1144,8 @@ $(function () {
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
var channel_id = decodeURIComponent(window.location.hash); var channel_id = decodeURIComponent(window.location.pathname);
if (channel_id.substr(0, 1) == "#") channel_id = channel_id.substr(1); if (channel_id.substr(0, 1) == "/") channel_id = channel_id.substr(1);
if (channel_id == "") channel_id = "lobby"; if (channel_id == "") channel_id = "lobby";
const isSecure = globalThis.location.protocol == "https:"; const isSecure = globalThis.location.protocol == "https:";
@ -2329,7 +2329,7 @@ $(function () {
if (name == "") name = "lobby"; if (name == "") name = "lobby";
if (gClient.channel && gClient.channel._id === name) return; if (gClient.channel && gClient.channel._id === name) return;
if (push) { if (push) {
var url = "/#" + encodeURIComponent(name).replace("'", "%27"); var url = "/" + encodeURIComponent(name).replace("'", "%27");
if (window.history && history.pushState) { if (window.history && history.pushState) {
history.pushState( history.pushState(
{ depth: (gHistoryDepth += 1), name: name }, { depth: (gHistoryDepth += 1), name: name },