« get me outta code hell

content: gCTExternalLinkSection: fix 'Other' for 3+ domain parts - 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>2024-06-18 18:09:18 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-06-18 22:56:17 -0300
commit2d3b9508fb5f6ae317521228e2979c3dbdf6ee02 (patch)
treed4c01ecc264fba5ab123fa1bb55b027c27385302 /src/content/dependencies
parent7bbb984e89d52b5eb0ef8f89668ffc2181764344 (diff)
content: gCTExternalLinkSection: fix 'Other' for 3+ domain parts
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/generateContributionTooltipExternalLinkSection.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/content/dependencies/generateContributionTooltipExternalLinkSection.js b/src/content/dependencies/generateContributionTooltipExternalLinkSection.js
index d4342098..4f9a23ed 100644
--- a/src/content/dependencies/generateContributionTooltipExternalLinkSection.js
+++ b/src/content/dependencies/generateContributionTooltipExternalLinkSection.js
@@ -58,8 +58,10 @@ export default {
                 // don't have a way of telling formatExternalLink to *not*
                 // use the fallback string, which just formats the URL as
                 // its host/domain... so is technically detectable.
-                ((html.resolve(platform, {normalize: 'string'}) ===
-                  (new URL(url)).host)
+                (((new URL(url))
+                    .host
+                    .endsWith(
+                      html.resolve(platform, {normalize: 'string'})))
 
                   ? language.$(capsule, 'noExternalLinkPlatformName')
                   : platform)),