« get me outta code hell

leave sidebar <details> collapsed on album pages - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <towerofnix@gmail.com>2021-05-10 13:18:15 -0300
committer(quasar) nebula <towerofnix@gmail.com>2021-05-10 13:18:15 -0300
commitf0453b0d5a1089aeb3d50192139f258b455af80b (patch)
treef60055a602c37d481bb7903187c51254f0b41b2a
parent604dc002bf840619b4554f182f41447cfc3865fc (diff)
leave sidebar <details> collapsed on album pages
-rwxr-xr-xsrc/upd8.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/upd8.js b/src/upd8.js
index 9aa5e76..6eea053 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -5765,7 +5765,10 @@ function generateSidebarForAlbum(album, currentTrack, {strings, to, wikiData}) {
         ${(album.trackGroups
             ? album.trackGroups.map(({ name, color, startIndex, tracks }) =>
                 html.tag('details', {
-                    open: !currentTrack || tracks.includes(currentTrack),
+                    // Leave side8ar track groups collapsed on al8um homepage,
+                    // since there's already a view of all the groups expanded
+                    // in the main content area.
+                    open: currentTrack && tracks.includes(currentTrack),
                     class: tracks.includes(currentTrack) && 'current'
                 }, [
                     html.tag('summary',