Skip to content
Snippets Groups Projects
Commit c5849805 authored by David Ormsbee's avatar David Ormsbee
Browse files

Merge pull request #264 from MITx/mm-video-fixes-for-index

Add rel=0 to all lightbox videos.
parents 50e8b0a8 315063ff
No related branches found
No related tags found
No related merge requests found
......@@ -77,8 +77,13 @@
$(this).leanModal({ top : 120, overlay: 1, closeButton: ".close-modal", position: 'absolute' });
embed = $($(this).attr('href')).find('iframe')
if(embed.length > 0) {
embed.data('src', embed.attr('src') + '?autoplay=1');
embed.attr('src', '');
if(embed.attr('src').indexOf("?") > 0) {
embed.data('src', embed.attr('src') + '&autoplay=1&rel=0');
embed.attr('src', '');
} else {
embed.data('src', embed.attr('src') + '?autoplay=1&rel=0');
embed.attr('src', '');
}
}
});
})(jQuery);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment