1/** 2 * @file 3 * Embed YouTube videos on Click. 4 */ 5(function ($) { 6 function youtubechannel_setvideo(href) { 7 youtubeid = href.replace("#",""); 8 jQuery('#youtubechannel-frame').attr('src','https://www.youtube.com/embed/' + youtubeid); 9 } 10 11 Drupal.behaviors.youtubechannel = { 12 attach: function (context, settings) { 13 if (jQuery('#youtubechannel-list a:first').length) { 14 youtubechannel_setvideo(jQuery('#youtubechannel-list a:first').attr('href')); 15 jQuery('#youtubechannel-list a').click(function(e) { 16 youtubechannel_setvideo(jQuery(this).attr('href')); 17 return false; 18 }); 19 } 20 } 21 } 22}(jQuery));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.