diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2023-07-12 15:32:31 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2023-07-12 15:32:31 -0700 |
commit | 8ea8433f0dc6b563dcc5724b4be8c473ee7fdd9f (patch) | |
tree | 3b2f138fee90a413f6ecb5f440af63aa4781636b /downloads | |
parent | downloads: put javascript at the bottom of the page (diff) | |
download | www-8ea8433f0dc6b563dcc5724b4be8c473ee7fdd9f.tar.gz www-8ea8433f0dc6b563dcc5724b4be8c473ee7fdd9f.tar.bz2 www-8ea8433f0dc6b563dcc5724b4be8c473ee7fdd9f.zip |
downloads: update page hash on tab click
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'downloads')
-rw-r--r-- | downloads/index.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/downloads/index.html b/downloads/index.html index 8960953..8d92f08 100644 --- a/downloads/index.html +++ b/downloads/index.html @@ -204,4 +204,14 @@ window.addEventListener( () => { loadTabByHash(); }, false ); +// If the user clicks on a tab, also update the hash. +$('#other-arches').on( + 'click', + 'a[data-toggle]', + function(event) { + // TODO: nicer if this updates browser history, but that gets into the realm of + // plugins. + window.location.hash = this.getAttribute('href'); + } +); </script> |