« get me outta code hell

content, external-links, test: provide album track count as context - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-02-14 13:07:09 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-02-14 13:44:36 -0400
commitd31c889df346b7579ce1afe0746fb4aa0ed8227d (patch)
tree8c98fb6c8d4c7d89e25968c99c0295aeac3880b5 /src/util
parent08114ae53a4053b45577860f0a127ee2e6b3e3a6 (diff)
content, external-links, test: provide album track count as context
Diffstat (limited to 'src/util')
-rw-r--r--src/util/external-links.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/util/external-links.js b/src/util/external-links.js
index 14ee10a..2cf23c6 100644
--- a/src/util/external-links.js
+++ b/src/util/external-links.js
@@ -24,6 +24,9 @@ export const isExternalLinkStyle = is(...externalLinkStyles);
 
 export const externalLinkContexts = [
   'album',
+  'albumOneTrack',
+  'albumMultipleTracks',
+  'albumNoTracks',
   'artist',
   'flash',
   'generic',
@@ -125,7 +128,7 @@ export const externalLinkSpec = [
 
   {
     match: {
-      context: 'album',
+      context: 'albumMultipleTracks',
       domain: 'youtube.com',
       pathname: /^watch/,
     },
@@ -138,7 +141,7 @@ export const externalLinkSpec = [
 
   {
     match: {
-      context: 'album',
+      context: 'albumMultipleTracks',
       domain: 'youtu.be',
     },