mirror of
https://github.com/vale981/Vulcan
synced 2025-03-07 02:21:43 -05:00
limit video lightboxes to youtube and vimeo
This commit is contained in:
parent
153e7d9c37
commit
04df5f7bd3
1 changed files with 5 additions and 1 deletions
|
@ -5,7 +5,11 @@ Template.post_thumbnail.onCreated(function () {
|
||||||
|
|
||||||
Template.post_thumbnail.helpers({
|
Template.post_thumbnail.helpers({
|
||||||
playVideoClass: function () {
|
playVideoClass: function () {
|
||||||
return (this.media && this.media.type === "video") ? 'post-thumbnail-has-video': '';
|
var url = this.url;
|
||||||
|
var isVideoSite = url && _.some(["youtube", "vimeo"], function (site) {
|
||||||
|
return url.indexOf(site) !== -1;
|
||||||
|
});
|
||||||
|
return (this.media && this.media.type === "video" && isVideoSite) ? 'post-thumbnail-has-video': '';
|
||||||
},
|
},
|
||||||
showVideo: function () {
|
showVideo: function () {
|
||||||
return Template.instance().showVideo.get();
|
return Template.instance().showVideo.get();
|
||||||
|
|
Loading…
Add table
Reference in a new issue