From 95f824c413e00dcc5042da6b59c8310c5980fd0c Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 30 Mar 2024 10:12:53 -0300 Subject: external-links, test: flatten not-so-special artist descriptors --- src/util/external-links.js | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) (limited to 'src/util') 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 { @@ -436,6 +410,15 @@ export const externalLinkSpec = [ icon: 'newgrounds', }, + { + match: {domain: 'patreon.com'}, + + platform: 'patreon', + handle: {pathname: /([^/]+)\/?$/}, + + icon: 'globe', + }, + { match: {domain: 'patreon.com'}, platform: 'patreon', @@ -496,6 +479,15 @@ export const externalLinkSpec = [ icon: 'misc', }, + { + match: {domain: 'youtube.com'}, + + platform: 'youtube', + handle: {pathname: /^@([^/]+)\/?$/}, + + icon: 'youtube', + }, + { match: {domains: ['youtube.com', 'youtu.be']}, platform: 'youtube', -- cgit 1.3.0-6-gf8a5