« get me outta code hell

external-links: reddit + subreddits - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/external-links.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-08-23 16:06:57 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-08-23 16:06:57 -0300
commita8e8b65418f27701c4ad71fe9a17a704d245e906 (patch)
treec2c80a9d6a6aca1310e9e94b5326677cbd96cf50 /src/external-links.js
parent5ec7b32b7ddc2f66082892c7f0640aac02533a1f (diff)
external-links: reddit + subreddits preview
Diffstat (limited to 'src/external-links.js')
-rw-r--r--src/external-links.js11
1 files changed, 11 insertions, 0 deletions
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
@@ -582,6 +582,17 @@ export const externalLinkSpec = [
   },
 
   {
+    match: {domains: ['reddit.com', 'old.reddit.com']},
+    platform: 'reddit',
+    icon: 'globe',
+
+    detail: {
+      substring: 'subreddit',
+      subreddit: {pathname: /^r\/[^\/]+(?=\/)?/},
+    },
+  },
+
+  {
     match: {domain: 'soundcloud.com'},
 
     platform: 'soundcloud',