« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/util/external-links.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/util/external-links.js b/src/util/external-links.js
index e19ecbfc..c5f51393 100644
--- a/src/util/external-links.js
+++ b/src/util/external-links.js
@@ -383,7 +383,7 @@ export const externalLinkSpec = [
   },
 
   {
-    match: {domain: 'fandom.com'},
+    match: {domains: ['fandom.com', '.fandom.com']},
     platform: 'fandom',
     icon: 'globe',
   },
@@ -435,6 +435,15 @@ export const externalLinkSpec = [
   },
 
   {
+    match: {domain: '.newgrounds.com'},
+
+    platform: 'newgrounds',
+    handle: {domain: /^[^.]+/},
+
+    icon: 'newgrounds',
+  },
+
+  {
     match: {domain: 'newgrounds.com'},
     platform: 'newgrounds',
     icon: 'newgrounds',
@@ -462,7 +471,7 @@ export const externalLinkSpec = [
   },
 
   {
-    match: {domain: 'spotify.com'},
+    match: {domains: ['spotify.com', 'open.spotify.com']},
     platform: 'spotify',
     icon: 'globe',
   },
@@ -495,7 +504,7 @@ export const externalLinkSpec = [
   },
 
   {
-    match: {domain: 'wikipedia.org'},
+    match: {domains: ['wikipedia.org', '.wikipedia.org']},
     platform: 'wikipedia',
     icon: 'misc',
   },