Skip to content

Commit

Permalink
disabled related youtube videos
Browse files Browse the repository at this point in the history
disabled the display of embedded related videos after a video finishes
  • Loading branch information
eballarin committed May 1, 2015
1 parent 3382ef2 commit 5ffa9e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/go_everypage.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ function hideVid () {
function go_display_help_video (url) {
jQuery('.dark').show();
if (url.indexOf('youtube') != -1 || url.indexOf('vimeo') != -1) {
if (url.indexOf('youtube') != -1 || url.indexOf( 'youtu.be' ) ) {
if ( url.indexOf('youtube') != -1 || url.indexOf( 'youtu.be' ) ) {
url = url.replace( 'watch?v=', 'v/' );
if ( url.indexOf( '&rel=0' ) == -1 ) {
url = url + '&rel=0';
}
jQuery('#go_help_video_container').html('<iframe id="go_video_iframe" width="100%" height="100%" src="'+ url +'" frameborder="0" allowfullscreen></iframe>');
}
if (url.indexOf('vimeo') != -1) {
Expand Down

0 comments on commit 5ffa9e3

Please sign in to comment.