« get me outta code hell

fix colorless album groups in sidebar (thanks FF!) - 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-04-06 13:32:50 -0300
committer(quasar) nebula <towerofnix@gmail.com>2021-04-06 13:32:50 -0300
commitab6f024f98195a55e5f6b8c7264e7a7eb918226e (patch)
treea345e4971bcc31f6f44768160913a36ccacaa316
parent458aea1a74d0e8e5b8ed39005b534ecf232471c2 (diff)
fix colorless album groups in sidebar (thanks FF!)
-rwxr-xr-xupd8.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/upd8.js b/upd8.js
index 3041b504..123dbcc5 100755
--- a/upd8.js
+++ b/upd8.js
@@ -5156,7 +5156,7 @@ function generateSidebarForAlbum(album, currentTrack, {strings, to}) {
 
     const trackToListItem = track => `<li ${classes(track === currentTrack && 'current')}>${
         strings('albumSidebar.trackList.item', {
-            track: `<a href="${to('localized.track', track.directory)}">${track.name}</a>`
+            track: strings.link.track(track, {to})
         })
     }</li>`;
 
@@ -5169,11 +5169,11 @@ function generateSidebarForAlbum(album, currentTrack, {strings, to}) {
                         <dt ${classes(tracks.includes(currentTrack) && 'current')}>${
                             (listTag === 'ol'
                                 ? strings('albumSidebar.trackList.group.withRange', {
-                                    group: `<a href="${to('localized.track', tracks[0].directory)}">${name}</a>`,
+                                    group: strings.link.track(tracks[0], {to, text: name}),
                                     range: `${startIndex + 1}&ndash;${startIndex + tracks.length}`
                                 })
                                 : strings('albumSidebar.trackList.group', {
-                                    group: `<a href="${to('localized.track', tracks[0].directory)}">${name}</a>`
+                                    group: strings.link.track(tracks[0], {to, text: name})
                                 }))
                         }</dt>
                         ${(!currentTrack || tracks.includes(currentTrack)) && fixWS`