-
-
Save dmathewwws/f93499a77ee56ba5b4b8108716d58175 to your computer and use it in GitHub Desktop.
SSS Links - Assumed base_urls based on type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getLinkBase(linkType){ | |
if (!linkType) return HTTPS | |
switch(linkType){ | |
case "INSTAGRAM": | |
return "https://instagram.com/" | |
case "YOUTUBE": | |
return "https://youtube.com/" | |
case "TIKTOK": | |
return "https://tiktok.com/@" | |
case "PATREON": | |
return "https://patreon.com/" | |
case "TWITTER": | |
return "https://twitter.com/" | |
case "FACEBOOK": | |
return "https://facebook.com/" | |
case "TWITCH": | |
return "https://twitch.tv/" | |
case "SNAPCHAT": | |
return "https://snapchat.com/add/" | |
case "REDDIT": | |
return "https://reddit.com/r/" | |
case "DISCORD": | |
return "https://discord.gg/" | |
case "TELEGRAM": | |
return "https://t.me/" | |
case "PINTEREST": | |
return "https://pinterest.com/" | |
case "TUMBLR": | |
return "https://tumblr.com/" | |
case "SPOTIFY": | |
return "https://open.spotify.com/" | |
case "SOUNDCLOUD": | |
return "https://soundcloud.com/" | |
case "BANDCAMP": | |
return "https://bandcamp.com/" | |
case "VIMEO": | |
return "https://vimeo.com/" | |
case "WECHAT": | |
return "https://wechat.com/" | |
case "WHATSAPP": | |
return "https://chat.whatsapp.com/" | |
case "WEBSITE": | |
case "MERCH_STORE": | |
return HTTPS | |
case "MASTODON": | |
case "EMAIL": | |
default: | |
return | |
} | |
} | |
const HTTPS = "https://"; | |
const allLinkTypes = [ | |
"INSTAGRAM", | |
"YOUTUBE", | |
"TIKTOK", | |
"PATREON", | |
"EMAIL", | |
"TWITTER", | |
"MASTODON", | |
"FACEBOOK", | |
"WEBSITE", | |
"MERCH_STORE", | |
"TWITCH", | |
"SNAPCHAT", | |
"REDDIT", | |
"DISCORD", | |
"TELEGRAM", | |
"PINTEREST", | |
"TUMBLR", | |
"SPOTIFY", | |
"SOUNDCLOUD", | |
"BANDCAMP", | |
"VIMEO", | |
"WECHAT", | |
"WHATSAPP" | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment