From c58e21df768e52411c3c7b739b01eddf3ae7ef51 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 30 Mar 2024 12:59:47 -0300 Subject: external-links: HSMusic (replacing "local") --- src/strings-default.yaml | 6 ++++-- src/util/external-links.js | 23 ++++++++++++++++------ .../test/snapshot/linkExternal.js.test.cjs | 8 ++++---- test/snapshot/linkExternal.js | 10 ++++++---- 4 files changed, 31 insertions(+), 16 deletions(-) diff --git a/src/strings-default.yaml b/src/strings-default.yaml index 5f3b115c..3c38f2f8 100644 --- a/src/strings-default.yaml +++ b/src/strings-default.yaml @@ -504,8 +504,6 @@ misc: withHandle: "{PLATFORM} ({HANDLE})" - local: "Wiki Archive (local upload)" - appleMusic: "Apple Music" artstation: "ArtStation" bandcamp: "Bandcamp" @@ -538,6 +536,10 @@ misc: page: "Homestuck (page {PAGE})" secretPage: "Homestuck (secret page)" + hsmusic: + _: "HSMusic" + archive: "HSMusic (wiki archive)" + instagram: "Instagram" internetArchive: "Internet Archive" itch: "itch.io" diff --git a/src/util/external-links.js b/src/util/external-links.js index da0889a3..b8b97849 100644 --- a/src/util/external-links.js +++ b/src/util/external-links.js @@ -376,6 +376,23 @@ export const externalLinkSpec = [ icon: 'globe', }, + { + match: { + domain: 'hsmusic.wiki', + pathname: /^media\/misc\/archive/, + }, + + platform: 'hsmusic.archive', + + icon: 'globe', + }, + + { + match: {domain: 'hsmusic.wiki'}, + platform: 'hsmusic', + icon: 'globe', + }, + { match: {domain: 'instagram.com'}, platform: 'instagram', @@ -416,12 +433,6 @@ export const externalLinkSpec = [ icon: 'kofi', }, - { - match: {domain: 'hsmusic.wiki'}, - platform: 'local', - icon: 'globe', - }, - { match: {domains: ['types.pl']}, diff --git a/tap-snapshots/test/snapshot/linkExternal.js.test.cjs b/tap-snapshots/test/snapshot/linkExternal.js.test.cjs index b09aff61..1d5cb425 100644 --- a/tap-snapshots/test/snapshot/linkExternal.js.test.cjs +++ b/tap-snapshots/test/snapshot/linkExternal.js.test.cjs @@ -98,14 +98,14 @@ exports[`test/snapshot/linkExternal.js > TAP > linkExternal (snapshot) > context GameBanana GameBanana Homestuck +HSMusic (wiki archive) +HSMusic Internet Archive Internet Archive Instagram tuyoki bravelittletoreador gnaach -Wiki Archive (local upload) -Wiki Archive (local upload) types.pl wodaro.neocities.org neomints.neocities.org @@ -167,14 +167,14 @@ exports[`test/snapshot/linkExternal.js > TAP > linkExternal (snapshot) > context GameBanana GameBanana Homestuck +HSMusic (wiki archive) +HSMusic Internet Archive Internet Archive Instagram itch.io itch.io Ko-fi -Wiki Archive (local upload) -Wiki Archive (local upload) Mastodon (types.pl) Neocities Neocities diff --git a/test/snapshot/linkExternal.js b/test/snapshot/linkExternal.js index 18885d14..0b6a4753 100644 --- a/test/snapshot/linkExternal.js +++ b/test/snapshot/linkExternal.js @@ -94,6 +94,12 @@ testContentFunctions(t, 'linkExternal (snapshot)', async (t, evaluate) => { // platform: homestuck 'https://homestuck.com/', + // platform: hsmusic.archive + 'https://hsmusic.wiki/media/misc/archive/Firefly%20Cloud%20Remix.mp3', + + // platform: hsmusic + 'https://hsmusic.wiki/feedback/', + // platform: internetArchive 'https://archive.org/details/a-life-well-lived', 'https://archive.org/details/VastError_Volume1/11+Renaissance.mp3', @@ -108,10 +114,6 @@ testContentFunctions(t, 'linkExternal (snapshot)', async (t, evaluate) => { // platform: ko-fi 'https://ko-fi.com/gnaach', - // platform: local - 'https://hsmusic.wiki/feedback/', - 'https://hsmusic.wiki/media/misc/archive/Firefly%20Cloud%20Remix.mp3', - // platform: mastodon 'https://types.pl/', -- cgit 1.3.0-6-gf8a5