Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Commit

Permalink
🔧
Browse files Browse the repository at this point in the history
  • Loading branch information
eramdam committed Aug 8, 2016
1 parent f211b5c commit 5208b13
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 37 deletions.
82 changes: 46 additions & 36 deletions src/js/util/thumbnails.js
Expand Up @@ -106,18 +106,18 @@ const schemeWhitelist = [
});
},
},
{
name: 'Bandcamp',
setting: 'bandcamp',
re: /bandcamp.com/,
default: true,
},
{
name: 'CloudApp',
setting: 'cl_ly',
re: /cl.ly/,
default: true,
},
// {
// name: 'Bandcamp',
// setting: 'bandcamp',
// re: /bandcamp.com/,
// default: true,
// },
// {
// name: 'CloudApp',
// setting: 'cl_ly',
// re: /cl.ly/,
// default: true,
// },
{
name: 'Dailymotion',
setting: 'dailymotion',
Expand Down Expand Up @@ -238,12 +238,12 @@ const schemeWhitelist = [
});
},
},
{
name: 'Giphy',
setting: 'giphy',
re: /(?:giphy.com\/gifs\/|gph.is\/)/,
default: true,
},
// {
// name: 'Giphy',
// setting: 'giphy',
// re: /(?:giphy.com\/gifs\/|gph.is\/)/,
// default: true,
// },
{
name: 'Imgur',
setting: 'imgur',
Expand Down Expand Up @@ -364,12 +364,34 @@ const schemeWhitelist = [
setting: 'spotify',
re: /(?:open.spotify.com|play.spotify.com|spoti.fi)/,
default: true,
callback: url => {
return fetch(`https://embed.spotify.com/oembed/?url=${url}`).then(statusAndJson)
.then(data => {
return {
type: 'audio',
html: data.html,
thumbnail_url: getSafeURL(data.thumbnail_url),
url,
};
});
},
},
{
name: 'Streamable',
setting: 'streamable',
re: /streamable.com/,
default: true,
callback: url => {
return fetch(`https://api.streamable.com/oembed.json?url=${url}`).then(statusAndJson)
.then(data => {
return {
type: 'video',
html: data.html,
thumbnail_url: getSafeURL(data.thumbnail_url),
url,
};
});
},
},
{
name: 'TED',
Expand All @@ -378,12 +400,6 @@ const schemeWhitelist = [
default: true,
callback: noEmbedVideoCB,
},
{
name: 'TinyGrab',
setting: 'tinygrab',
re: /grab.by/,
default: true,
},
{
name: 'Tumblr',
setting: 'tumblr',
Expand All @@ -395,18 +411,12 @@ const schemeWhitelist = [
url: getSafeURL(url),
}),
},
{
name: 'Twitch',
setting: 'twitch_tv',
re: /twitch.tv/,
default: true,
},
{
name: 'Vidme',
setting: 'vid_me',
re: /(?:vidd.me|vid.me)/,
default: true,
},
// {
// name: 'Twitch',
// setting: 'twitch_tv',
// re: /twitch.tv/,
// default: true,
// },
{
name: 'Vimeo',
setting: 'vimeo',
Expand Down
4 changes: 3 additions & 1 deletion src/manifest.json
Expand Up @@ -2,7 +2,7 @@
"name": "__MSG_appName__",
"short_name": "BetterTDeck",
"default_locale": "en",
"version": "3.0.8",
"version": "3.0.9",
"manifest_version": 2,
"description": "__MSG_appDesc__",
"homepage_url": "https://github.com/eramdam/BetterTweetDeck/",
Expand All @@ -27,6 +27,8 @@
"https://*.imgur.com/*",
"https://images4-focus-opensocial.googleusercontent.com/gadgets/proxy*",
"http://erambert.me/*",
"https://embed.spotify.com/oembed/*",
"https://api.streamable.com/*",
"*://tweetdeck.twitter.com/*",
"contextMenus"
],
Expand Down

0 comments on commit 5208b13

Please sign in to comment.