« get me outta code hell

support mastodon external links - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/upd8.js
diff options
context:
space:
mode:
author(quasar) nebula <towerofnix@gmail.com>2020-11-10 14:28:30 -0400
committer(quasar) nebula <towerofnix@gmail.com>2020-11-10 14:28:30 -0400
commit19829f9b6bfcde97861185658578f2b9f2057871 (patch)
treeddc4e0564c0d1fcd44ac4170e6d7ec362f37d0cd /upd8.js
parent157ffb24a57e04ddd19f93c9dfff64df5a6208fd (diff)
support mastodon external links
Diffstat (limited to 'upd8.js')
-rw-r--r--upd8.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/upd8.js b/upd8.js
index 1258c5e..f2d4ed4 100644
--- a/upd8.js
+++ b/upd8.js
@@ -2428,6 +2428,9 @@ function fancifyURL(url, {album = false} = {}) {
         (
             url.includes('music.solatrus.com')
         ) ? `Bandcamp (${new URL(url).hostname})` :
+        (
+            url.includes('types.pl')
+        ) ? `Mastodon (${new URL(url).hostname})` :
         url.includes('youtu') ? (album ? (
             url.includes('list=') ? 'YouTube (Playlist)' : 'YouTube (Full Album)'
         ) : 'YouTube') :
@@ -2448,6 +2451,9 @@ function iconifyURL(url) {
         (
             url.includes('music.solatrus.com')
         ) ? ['bandcamp', `Bandcamp (${new URL(url).hostname})`] :
+        (
+            url.includes('types.pl')
+        ) ? ['mastodon', `Mastodon (${new URL(url).hostname})`] :
         url.includes('youtu') ? ['youtube', 'YouTube'] :
         url.includes('soundcloud') ? ['soundcloud', 'SoundCloud'] :
         url.includes('tumblr.com') ? ['tumblr', 'Tumblr'] :