« get me outta code hell

content, test: linkExternal: fandom page links - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-10-04 19:56:44 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-10-04 19:56:44 -0300
commit0a2b420891db2832ac5bc7e25cbe3fc2c15859a7 (patch)
treec85855a9e6a05409e3f1666076553aaf06da3701 /src/content/dependencies
parent682c8a9591b59959184d6e374d8cdd73c6ddf53d (diff)
content, test: linkExternal: fandom page links
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/linkExternal.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/content/dependencies/linkExternal.js b/src/content/dependencies/linkExternal.js
index c6e4d3ba..b1859dde 100644
--- a/src/content/dependencies/linkExternal.js
+++ b/src/content/dependencies/linkExternal.js
@@ -58,7 +58,14 @@ export default {
 
     : domain.includes('fandom.com')
         ? domain.includes('mspaintadventures.')
-          ? language.$('misc.external.fandom.mspaintadventures')
+          ? data.url.match(/\/wiki\/(.+)\/?$/)
+            ? language.$('misc.external.fandom.mspaintadventures.page', {
+                page:
+                  language.sanitize(
+                    decodeURIComponent(data.url.match(/\/wiki\/(.+)\/?$/)[1])
+                      .replace(/_/g, ' ')),
+              })
+            : language.$('misc.external.fandom.mspaintadventures')
           : language.$('misc.external.fandom')
 
     : domain.includes('soundcloud')