From a8e8b65418f27701c4ad71fe9a17a704d245e906 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 23 Aug 2025 16:06:57 -0300 Subject: external-links: reddit + subreddits --- src/external-links.js | 11 +++++++++++ src/strings-default.yaml | 5 +++++ 2 files changed, 16 insertions(+) (limited to 'src') diff --git a/src/external-links.js b/src/external-links.js index ab1555bd..a4e16325 100644 --- a/src/external-links.js +++ b/src/external-links.js @@ -581,6 +581,17 @@ export const externalLinkSpec = [ icon: 'globe', }, + { + match: {domains: ['reddit.com', 'old.reddit.com']}, + platform: 'reddit', + icon: 'globe', + + detail: { + substring: 'subreddit', + subreddit: {pathname: /^r\/[^\/]+(?=\/)?/}, + }, + }, + { match: {domain: 'soundcloud.com'}, diff --git a/src/strings-default.yaml b/src/strings-default.yaml index fa884848..a8dbc28c 100644 --- a/src/strings-default.yaml +++ b/src/strings-default.yaml @@ -719,6 +719,11 @@ misc: nintendoMusic: "Nintendo Music" patreon: "Patreon" poetryFoundation: "Poetry Foundation" + + reddit: + _: "Reddit" + subreddit: "Reddit ({SUBREDDIT})" + soundcloud: "SoundCloud" spotify: "Spotify" steam: "Steam" -- cgit 1.3.0-6-gf8a5