diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2024-07-23 12:56:48 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2024-07-23 12:56:48 +0200 |
commit | 9df96fa03b73513ded6163de7d08afc318c61575 (patch) | |
tree | e8dce1468d553820c41821680e3a49c2f9cfd691 /view | |
parent | 7afb01e4889761f4b420b37d626a8c96f41434fa (diff) | |
download | volse-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.
Diffstat (limited to 'view')
-rw-r--r-- | view/js/mod_help.js | 2 |
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'); |