From 19829f9b6bfcde97861185658578f2b9f2057871 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 10 Nov 2020 14:28:30 -0400 Subject: support mastodon external links --- upd8.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'upd8.js') diff --git a/upd8.js b/upd8.js index 1258c5e6..f2d4ed42 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'] : -- cgit 1.3.0-6-gf8a5