« get me outta code hell

content: iconifyURL (extra) -> generateIconForURL - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/misc-templates.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-03-29 09:47:30 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-03-29 09:47:30 -0300
commit543d087fc465ea56ec0b156d488119c3a64c55aa (patch)
tree4298287941b09fe6c89731cf3222449f6d1a6c6f /src/misc-templates.js
parentf69d3397ea370793094261daa769aa893bdd74b1 (diff)
content: iconifyURL (extra) -> generateIconForURL
Diffstat (limited to 'src/misc-templates.js')
-rw-r--r--src/misc-templates.js46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/misc-templates.js b/src/misc-templates.js
index 11a95c7..39e62dd 100644
--- a/src/misc-templates.js
+++ b/src/misc-templates.js
@@ -18,10 +18,6 @@ import {
   sortChronologically,
 } from './util/wiki-data.js';
 
-const BANDCAMP_DOMAINS = ['bc.s3m.us', 'music.solatrux.com'];
-
-const MASTODON_DOMAINS = ['types.pl'];
-
 // "Additional Files" listing
 
 function unbound_generateAdditionalFilesShortcut(additionalFiles, {
@@ -337,48 +333,6 @@ function unbound_fancifyFlashURL(url, flash, {
     : link);
 }
 
-function unbound_iconifyURL(url, {
-  html,
-  language,
-  to,
-}) {
-  const domain = new URL(url).hostname;
-  const [id, msg] = (
-    domain.includes('bandcamp.com')
-      ? ['bandcamp', language.$('misc.external.bandcamp')]
-    : BANDCAMP_DOMAINS.includes(domain)
-      ? ['bandcamp', language.$('misc.external.bandcamp.domain', {domain})]
-    : MASTODON_DOMAINS.includes(domain)
-      ? ['mastodon', language.$('misc.external.mastodon.domain', {domain})]
-    : domain.includes('youtu')
-      ? ['youtube', language.$('misc.external.youtube')]
-    : domain.includes('soundcloud')
-      ? ['soundcloud', language.$('misc.external.soundcloud')]
-    : domain.includes('tumblr.com')
-      ? ['tumblr', language.$('misc.external.tumblr')]
-    : domain.includes('twitter.com')
-      ? ['twitter', language.$('misc.external.twitter')]
-    : domain.includes('deviantart.com')
-      ? ['deviantart', language.$('misc.external.deviantart')]
-    : domain.includes('instagram.com')
-      ? ['instagram', language.$('misc.external.bandcamp')]
-    : domain.includes('newgrounds.com')
-      ? ['newgrounds', language.$('misc.external.newgrounds')]
-      : ['globe', language.$('misc.external.domain', {domain})]);
-
-  return html.tag('a',
-    {
-      href: url,
-      class: 'icon',
-    },
-    html.tag('svg', [
-      html.tag('title', msg),
-      html.tag('use', {
-        href: to('shared.staticFile', `icons.svg#icon-${id}`),
-      }),
-    ]));
-}
-
 // Grids
 
 function unbound_getGridHTML({