diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-10-30 19:40:29 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-10-30 19:40:29 -0400 |
| commit | 936dac0d53696d48c8e24998731c3440022207ca (patch) | |
| tree | 81233ddf8436db63a30d631aa4cb3d8e6761b874 /StoneIsland/www/js/lib/blogs/HubView.js | |
| parent | 1f5a5bb6423ed9c93e06ee3d5069c9d8a9485d5f (diff) | |
fix gallery thumbnail
Diffstat (limited to 'StoneIsland/www/js/lib/blogs/HubView.js')
| -rwxr-xr-x | StoneIsland/www/js/lib/blogs/HubView.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/StoneIsland/www/js/lib/blogs/HubView.js b/StoneIsland/www/js/lib/blogs/HubView.js index 198113c8..dd88839c 100755 --- a/StoneIsland/www/js/lib/blogs/HubView.js +++ b/StoneIsland/www/js/lib/blogs/HubView.js @@ -102,6 +102,11 @@ var HubView = ScrollableView.extend({ play.className = "play" $(".gallery-" + row.id).append(play) $(".gallery-" + row.id).addClass("gallery-video-post") + if (! row.image) { + var url = row.link + var ytid = (url.match(/v=([-_a-zA-Z0-9]{11})/i) || url.match(/youtu.be\/([-_a-zA-Z0-9]{11})/i) || url.match(/embed\/([-_a-zA-Z0-9]{11})/i))[1].split('&')[0]; + e.style.backgroundImage = "url(https://i.ytimg.com/vi/" + ytid + "/maxresdefault.jpg" + } } $t.find(".gallery-left").remove() $t.find(".gallery-right").remove() |
