aboutsummaryrefslogtreecommitdiff
path: root/views/user/index.php
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2025-02-09 21:30:28 +0200
committerSyndamia <kamen@syndamia.com>2025-02-09 21:30:28 +0200
commit1cf37089ebe8f662abdb15773f9886a1e3521fc3 (patch)
treef89c15d35f938d6212f4a456903d35b70c182e44 /views/user/index.php
parent3807c4563441488e0ea7b1b2bff228983b3dba84 (diff)
downloadnowayforward_human-1cf37089ebe8f662abdb15773f9886a1e3521fc3.tar
nowayforward_human-1cf37089ebe8f662abdb15773f9886a1e3521fc3.tar.gz
nowayforward_human-1cf37089ebe8f662abdb15773f9886a1e3521fc3.zip
feat(views/user): Hash for archives and lists subpages
Diffstat (limited to 'views/user/index.php')
-rw-r--r--views/user/index.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/views/user/index.php b/views/user/index.php
index a674839..8410575 100644
--- a/views/user/index.php
+++ b/views/user/index.php
@@ -82,12 +82,18 @@
elemOpenLists.classList.add('not-selected');
userArchives.hidden = false;
userLists.hidden = true;
+ location.hash = 'archives';
}
function openLists() {
elemOpenArchives.classList.add('not-selected');
elemOpenLists.classList.remove('not-selected');
userArchives.hidden = true;
userLists.hidden = false;
+ location.hash = 'lists';
+ }
+
+ if (location.hash.slice(1) === 'lists') {
+ openLists();
}
</script>