1function initializeTwoClickEmbed() { 2 $(document).on('keypress', '.video_wrapper button[type="submit"]', function (e) { 3 var key = e.which; 4 if(key == 13) // the enter key code 5 { 6 $(this).click(); 7 return false; 8 } 9 }); 10 11 // YouTube accept button (delegiert, funktioniert auch bei geklonten Elementen z.B. in Slidern) 12 $(document).on('click', '.video_trigger.youtube button[type="submit"]', function() { 13 if (!Cookies.get('youtube_cookie_status')) { 14 $animation_timeout = 3600; 15 var unix_timestamp = $.now() + $animation_timeout * 1000 16 var date = new Date(unix_timestamp); 17 Cookies.set('youtube_cookie_status', unix_timestamp, { expires: date }); 18 } 19 20 var _trigger = $( this ).closest('.video_trigger'); 21 var isPortrait = _trigger.attr('data-portrait') === '1'; 22 var videoSource = _trigger.attr( 'data-source' ); 23 var videoCaption = _trigger.attr( 'data-caption' ); 24 var openOpts = { 25 caption : videoCaption, 26 autoFocus: false 27 }; 28 if (isPortrait) { 29 openOpts.width = 350; 30 openOpts.height = 622; 31 openOpts.afterShow = function() { 32 $('.fancybox-content').addClass('fancybox-portrait'); 33 }; 34 } 35 $(document).one('afterClose.fb', function() { 36 $.fancybox.open({ 37 src: videoSource, 38 opts: openOpts 39 }); 40 }); 41 $.fancybox.close(); 42 }); 43 44 // Vimeo accept button 45 $(document).on('click', '.video_trigger.vimeo button[type="submit"]', function() { 46 if (!Cookies.get('vimeo_cookie_status')) { 47 $animation_timeout = 3600; 48 var unix_timestamp = $.now() + $animation_timeout * 1000 49 var date = new Date(unix_timestamp); 50 Cookies.set('vimeo_cookie_status', unix_timestamp, { expires: date }); 51 } 52 53 var _trigger = $( this ).closest('.video_trigger'); 54 $(document).one('afterClose.fb', function() { 55 $.fancybox.open({ 56 src: _trigger.attr( 'data-source' ), 57 opts : { 58 caption : _trigger.attr( 'data-caption' ) 59 } 60 }); 61 }); 62 $.fancybox.close(); 63 }); 64 65 // SoundCloud accept button 66 $(document).on('click', '.video_trigger.soundcloud button[type="submit"]', function() { 67 if (!Cookies.get('soundcloud_cookie_status')) { 68 $animation_timeout = 3600; 69 var unix_timestamp = $.now() + $animation_timeout * 1000 70 var date = new Date(unix_timestamp); 71 Cookies.set('soundcloud_cookie_status', unix_timestamp, { expires: date }); 72 } 73 74 var _trigger = $( this ).closest('.video_trigger'); 75 $(document).one('afterClose.fb', function() { 76 $.fancybox.open({ 77 src: '<div>'+_trigger.attr('data-source')+'</div>', 78 type: "html", 79 opts : { 80 caption : _trigger.attr( 'data-caption' ) 81 } 82 }); 83 }); 84 $.fancybox.close(); 85 }); 86 87 // Embed accept button 88 $(document).on('click', '.video_trigger.embed button[type="submit"]', function() { 89 var _trigger = $( this ).closest('.video_trigger'); 90 var service = _trigger.attr( 'data-service' ); 91 92 if (!Cookies.get(service+'_cookie_status')) { 93 $animation_timeout = 3600; 94 var unix_timestamp = $.now() + $animation_timeout * 1000 95 var date = new Date(unix_timestamp); 96 Cookies.set(service+'_cookie_status', unix_timestamp, { expires: date }); 97 } 98 99 var width = _trigger.attr('data-width'); 100 var widthcss = ""; 101 if (width) { 102 widthcss = ' style="width:'+width+'"'; 103 } 104 var embedCode = _trigger.attr('data-source'); 105 106 $(document).one('afterClose.fb', function() { 107 $.fancybox.open({ 108 src: '<div'+widthcss+'>'+embedCode+'</div>', 109 type: "html", 110 opts : { 111 caption : _trigger.attr( 'data-caption' ) 112 } 113 }); 114 $('.fancybox-content').addClass("embed-"+service); 115 }); 116 $.fancybox.close(); 117 }); 118} 119 120(function($) { 121 $( document ).ready( function() { 122 initializeTwoClickEmbed(); 123 $('.externeMedien2click').keypress(function (e) { 124 var key = e.which; 125 if(key == 13) // the enter key code 126 { 127 $(this).click(); 128 return false; 129 } 130 }); 131 $('body').on('click','.externeMedien2click', function() { 132 if ($(this).hasClass("youtube") && !Cookies.get('youtube_cookie_status')) { 133 $.fancybox.open({ 134 src: $( this ).attr( 'data-src' ), 135 opts : { 136 caption : $( this ).attr( 'data-caption' ), 137 autoFocus: false 138 } 139 }); 140 } 141 else if ($(this).hasClass("vimeo") && !Cookies.get('vimeo_cookie_status')) { 142 $.fancybox.open({ 143 src: $( this ).attr( 'data-src' ), 144 opts : { 145 caption : $( this ).attr( 'data-caption' ), 146 autoFocus: false 147 } 148 }); 149 } 150 else if ($(this).hasClass("soundcloud")) { 151 if (!Cookies.get('soundcloud_cookie_status')) { 152 $.fancybox.open({ 153 src: $( this ).attr( 'data-src' ), 154 opts : { 155 caption : $( this ).attr( 'data-caption' ), 156 autoFocus: false 157 } 158 }); 159 } 160 else { 161 var dialog = $( this ).attr( 'data-src' ); 162 var _trigger = $(dialog).find('.video_trigger'); 163 $.fancybox.open({ 164 src: '<div>'+_trigger.attr('data-source')+'</div>', 165 type: "html", 166 opts : { 167 caption : _trigger.attr( 'data-caption' ), 168 autoFocus: false 169 }, 170 }); 171 } 172 } 173 else if ($(this).hasClass("embed")) { 174 var service = $( this ).attr( 'data-service' ); 175 if (!Cookies.get(service+'_cookie_status')) { 176 $.fancybox.open({ 177 src: $( this ).attr( 'data-src' ), 178 opts : { 179 caption : $( this ).attr( 'data-caption' ), 180 autoFocus: false 181 } 182 }); 183 } 184 else { 185 var dialog = $( this ).attr( 'data-src' ); 186 var _trigger = $(dialog).find('.video_trigger'); 187 var width = $( this ).attr('data-width'); 188 var widthcss = ""; 189 if (width) { 190 widthcss = ' style="width:'+width+'"'; 191 } 192 var embedCode2 = _trigger.attr('data-source'); 193 $.fancybox.open({ 194 src: '<div'+widthcss+'>'+embedCode2+'</div>', 195 type: "html", 196 opts : { 197 caption : _trigger.attr( 'data-caption' ), 198 autoFocus: false 199 }, 200 }); 201 $('.fancybox-content').addClass("embed-"+service); 202 } 203 204 } 205 else { 206 var dialog = $( this ).attr( 'data-src' ); 207 var _trigger = $(dialog).find('.video_trigger'); 208 var isPortrait = _trigger.attr('data-portrait') === '1'; 209 var openOpts = { 210 caption : _trigger.attr( 'data-caption' ), 211 autoFocus: false 212 }; 213 if (isPortrait) { 214 openOpts.width = 350; 215 openOpts.height = 622; 216 openOpts.afterShow = function() { 217 $('.fancybox-content').addClass('fancybox-portrait'); 218 }; 219 } 220 $.fancybox.open({ 221 src: _trigger.attr( 'data-source' ), 222 opts : openOpts, 223 }); 224 } 225 }); 226 }); 227})(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.