From 3fcacaf39a78ad1c6c86a0ae126bdb6e388cb704 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 30 Mar 2024 14:18:29 -0300 Subject: external-links: Toyhouse --- src/static/icons.svg | 12 ++++++++++-- src/strings-default.yaml | 1 + src/util/external-links.js | 11 ++++++++++- tap-snapshots/test/snapshot/linkExternal.js.test.cjs | 2 ++ test/snapshot/linkExternal.js | 3 +++ 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/static/icons.svg b/src/static/icons.svg index 8125d935..ff8bdc80 100644 --- a/src/static/icons.svg +++ b/src/static/icons.svg @@ -21,10 +21,18 @@ + + + + + + - - + + + + diff --git a/src/strings-default.yaml b/src/strings-default.yaml index 5df10500..8cf3a734 100644 --- a/src/strings-default.yaml +++ b/src/strings-default.yaml @@ -555,6 +555,7 @@ misc: soundcloud: "SoundCloud" spotify: "Spotify" tiktok: "TikTok" + toyhouse: "Toyhouse" tumblr: "Tumblr" twitch: "Twitch" twitter: "Twitter" diff --git a/src/util/external-links.js b/src/util/external-links.js index 88d85d92..3b779afc 100644 --- a/src/util/external-links.js +++ b/src/util/external-links.js @@ -555,6 +555,15 @@ export const externalLinkSpec = [ icon: 'tiktok', }, + { + match: {domain: 'toyhou.se'}, + + platform: 'toyhouse', + handle: {pathname: /^([^/]+)\/?$/}, + + icon: 'toyhouse', + }, + { match: {domain: '.tumblr.com'}, @@ -568,7 +577,7 @@ export const externalLinkSpec = [ match: {domain: 'tumblr.com'}, platform: 'tumblr', - handle: {pathname: /^[^/]+\/?$/}, + handle: {pathname: /^([^/]+)\/?$/}, icon: 'tumblr', }, diff --git a/tap-snapshots/test/snapshot/linkExternal.js.test.cjs b/tap-snapshots/test/snapshot/linkExternal.js.test.cjs index 10c8e88e..8f5a9b48 100644 --- a/tap-snapshots/test/snapshot/linkExternal.js.test.cjs +++ b/tap-snapshots/test/snapshot/linkExternal.js.test.cjs @@ -126,6 +126,7 @@ exports[`test/snapshot/linkExternal.js > TAP > linkExternal (snapshot) > context Spotify Spotify richaadeb +ghastaboo aeritus vol5anthology electricwestern @@ -201,6 +202,7 @@ exports[`test/snapshot/linkExternal.js > TAP > linkExternal (snapshot) > context Spotify Spotify TikTok +Toyhouse Tumblr Tumblr Tumblr diff --git a/test/snapshot/linkExternal.js b/test/snapshot/linkExternal.js index 43ffe953..90c98f4b 100644 --- a/test/snapshot/linkExternal.js +++ b/test/snapshot/linkExternal.js @@ -156,6 +156,9 @@ testContentFunctions(t, 'linkExternal (snapshot)', async (t, evaluate) => { // platform: tiktok 'https://www.tiktok.com/@richaadeb', + // platform: toyhouse + 'https://toyhou.se/ghastaboo', + // platform: tumblr 'https://aeritus.tumblr.com/', 'https://vol5anthology.tumblr.com/post/159528808107/hey-everyone-its-413-and-that-means-we-have', -- cgit 1.3.0-6-gf8a5