From 0a2b420891db2832ac5bc7e25cbe3fc2c15859a7 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 4 Oct 2023 19:56:44 -0300 Subject: content, test: linkExternal: fandom page links --- src/content/dependencies/linkExternal.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/content/dependencies') 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') -- cgit 1.3.0-6-gf8a5