From 25806dc2d228d654c29b109ab0411c00bb5990f1 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 30 Mar 2024 13:02:46 -0300 Subject: external-links: Instagram handles --- src/util/external-links.js | 9 +++++++++ tap-snapshots/test/snapshot/linkExternal.js.test.cjs | 4 +++- test/snapshot/linkExternal.js | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/util/external-links.js b/src/util/external-links.js index b8b97849..a76c1e95 100644 --- a/src/util/external-links.js +++ b/src/util/external-links.js @@ -393,6 +393,15 @@ export const externalLinkSpec = [ icon: 'globe', }, + { + match: {domain: 'instagram.com'}, + + platform: 'instagram', + handle: {pathname: /^[^/]+/}, + + icon: 'instagram', + }, + { match: {domain: 'instagram.com'}, platform: 'instagram', diff --git a/tap-snapshots/test/snapshot/linkExternal.js.test.cjs b/tap-snapshots/test/snapshot/linkExternal.js.test.cjs index 1d5cb425..16175861 100644 --- a/tap-snapshots/test/snapshot/linkExternal.js.test.cjs +++ b/tap-snapshots/test/snapshot/linkExternal.js.test.cjs @@ -102,7 +102,8 @@ exports[`test/snapshot/linkExternal.js > TAP > linkExternal (snapshot) > context HSMusic Internet Archive Internet Archive -Instagram +bass.and.noises +levc_egm tuyoki bravelittletoreador gnaach @@ -171,6 +172,7 @@ exports[`test/snapshot/linkExternal.js > TAP > linkExternal (snapshot) > context HSMusic Internet Archive Internet Archive +Instagram Instagram itch.io itch.io diff --git a/test/snapshot/linkExternal.js b/test/snapshot/linkExternal.js index 0b6a4753..a9ce7eb2 100644 --- a/test/snapshot/linkExternal.js +++ b/test/snapshot/linkExternal.js @@ -105,6 +105,7 @@ testContentFunctions(t, 'linkExternal (snapshot)', async (t, evaluate) => { 'https://archive.org/details/VastError_Volume1/11+Renaissance.mp3', // platform: instagram + 'https://instagram.com/bass.and.noises', 'https://www.instagram.com/levc_egm/', // platform: itch -- cgit 1.3.0-6-gf8a5