1/** 2 * @file 3 * Defines Javascript behaviors for the cookies module. 4 */; 5 6(function (Drupal, $) { 7 'use strict'; 8 9 /** 10 * Define defaults. 11 */ 12 Drupal.behaviors.cookiesVimeo = { 13 14 id: 'vimeo', 15 16 activate: function () { 17 $('.cookie-video-consent').remove(); 18 $('iframe').each(function(){ 19 if($(this).attr('data-src')) 20 { 21 $(this).attr('src', $(this).attr('data-src')); 22 } 23 }); 24 }, 25 26 attach: function (context) { 27 var self = this; 28 document.addEventListener('cookiesjsrUserConsent', function (event) { 29 var service = (typeof event.detail.services === 'object') ? event.detail.services : {}; 30 if (typeof service.vimeo !== 'undefined' && service.vimeo) { 31 self.activate(context); 32 } 33 }); 34 } 35 }; 36})(Drupal, 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.