« get me outta code hell

external-links, test: flatten not-so-special artist descriptors - 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-03-30 10:12:53 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-03-30 10:12:53 -0300
commit95f824c413e00dcc5042da6b59c8310c5980fd0c (patch)
treed1962aea74fd64f8e965ce59eec047e559ccbf93 /src/util
parent2e904ae8ef980073860387bc66ae6efe95a17cc0 (diff)
external-links, test: flatten not-so-special artist descriptors
Diffstat (limited to 'src/util')
-rw-r--r--src/util/external-links.js44
1 files changed, 18 insertions, 26 deletions
diff --git a/src/util/external-links.js b/src/util/external-links.js
index edef0701..503512f3 100644
--- a/src/util/external-links.js
+++ b/src/util/external-links.js
@@ -152,32 +152,6 @@ export const externalLinkSpec = [
     icon: 'youtube',
   },
 
-  // Special handling for artist links
-
-  {
-    match: {
-      domain: 'patreon.com',
-      context: 'artist',
-    },
-
-    platform: 'patreon',
-    handle: {pathname: /([^/]+)\/?$/},
-
-    icon: 'globe',
-  },
-
-  {
-    match: {
-      context: 'artist',
-      domain: 'youtube.com',
-    },
-
-    platform: 'youtube',
-    handle: {pathname: /^@([^/]+)\/?$/},
-
-    icon: 'youtube',
-  },
-
   // Special handling for flash links
 
   {
@@ -438,6 +412,15 @@ export const externalLinkSpec = [
 
   {
     match: {domain: 'patreon.com'},
+
+    platform: 'patreon',
+    handle: {pathname: /([^/]+)\/?$/},
+
+    icon: 'globe',
+  },
+
+  {
+    match: {domain: 'patreon.com'},
     platform: 'patreon',
     icon: 'globe',
   },
@@ -497,6 +480,15 @@ export const externalLinkSpec = [
   },
 
   {
+    match: {domain: 'youtube.com'},
+
+    platform: 'youtube',
+    handle: {pathname: /^@([^/]+)\/?$/},
+
+    icon: 'youtube',
+  },
+
+  {
     match: {domains: ['youtube.com', 'youtu.be']},
     platform: 'youtube',
     icon: 'youtube',