aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-07-23 12:56:48 +0200
committerHarald Eilertsen <haraldei@anduin.net>2024-07-23 12:56:48 +0200
commit9df96fa03b73513ded6163de7d08afc318c61575 (patch)
treee8dce1468d553820c41821680e3a49c2f9cfd691
parent7afb01e4889761f4b420b37d626a8c96f41434fa (diff)
downloadvolse-hubzilla-9df96fa03b73513ded6163de7d08afc318c61575.tar.gz
volse-hubzilla-9df96fa03b73513ded6163de7d08afc318c61575.tar.bz2
volse-hubzilla-9df96fa03b73513ded6163de7d08afc318c61575.zip
Don't modify address bar when loading help topic.
Modifying the current URL like this causes several problems, and is imo bad practice. When requesting a help topic without specifying the language in the URL (like `help/member/member_guide`) the locale for the current channel is used to fetch the topic. On the other hand, if fetching a topic with the language in the URL, the detected language will be used. Since the channel locale may not match the locale supported by the help system, weird situations may arise. I.e. fetching the topic without language in the URL works, but as the URL has now been rewritten, reloading the page will fail with a 404 status. Being a bit less clever solves this issue, and leaves the web browser to behave more as expected by the user.
-rw-r--r--view/js/mod_help.js2
1 files changed, 0 insertions, 2 deletions
diff --git a/view/js/mod_help.js b/view/js/mod_help.js
index 9c3591498..b87e300fa 100644
--- a/view/js/mod_help.js
+++ b/view/js/mod_help.js
@@ -97,8 +97,6 @@ $(document).ready(function () {
}
}
- // Update the address bar to reflect the loaded language
- window.history.replaceState({}, '', '/' + pathParts.join('/'));
// Highlight the language in the language selector that is currently viewed
$('.lang-selector').find('.lang-choice:contains("' + help_language + '")').addClass('active');