1/** 2 * Created by t.stulka on 2017-02-03. 3 */ 4var youTube = { 5 getId: function (name, movie) { 6 //movie is a global variable served by thymeleaf 7 if(typeof movie !== 'undefined' && typeof name !== 'undefined') { 8 var match = RegExp('[?&]' + name + '=([^&]*)').exec(movie); 9 return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); 10 } else { 11 console.log('error: movie variable is not defined'); 12 return null; 13 } 14 } 15}; 16 17function renderYouTube($wrapper) { 18 var videoUrl = $wrapper.data("yt"); 19 if (window.OnetrustActiveGroups === undefined || (window.OnetrustActiveGroups && window.OnetrustActiveGroups.includes("C0004"))) { 20 $wrapper.html('<iframe class="embed-responsive-item" src="' + videoUrl + '" frameborder="0" allowfullscreen></iframe>'); 21 } else { 22 $wrapper.html( 23 '<p>Please accept cookies to view this content.</p>' + 24 '<a href="#" class="manage-cookies" title="Manage Cookies">Manage Cookies</a>' 25 ); 26 $wrapper.find('.manage-cookies').on('click', function(e) { 27 e.preventDefault(); 28 if (typeof OneTrust !== 'undefined' && OneTrust.ToggleInfoDisplay) { 29 OneTrust.ToggleInfoDisplay(); 30 } 31 }); 32 } 33} 34 35function hydrateYouTubes() { 36 $(".optanon-category-C0004").each(function () { 37 renderYouTube($(this)); 38 }); 39} 40 41window.OptanonWrapper = hydrateYouTubes; 42$(document).on("OneTrustGroupsUpdated", hydrateYouTubes); 43$(function() { 44 hydrateYouTubes(); 45});
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.