Loading modules/cookies_ga/js/cookies_ga.js +5 −6 Original line number Diff line number Diff line /** * @file * Defines Javascript behaviors for the cookies module. */; */ (function (Drupal) { 'use strict'; /** * Define defaults. */ Drupal.behaviors.cookies_ga = { Drupal.behaviors.cookiesGa = { activate: function () { var scriptIds = [ Loading @@ -24,7 +23,7 @@ var attributes = Array.from(script.attributes); for (var attr in attributes) { var name = attributes[attr].nodeName; if (name !== 'type') { if (name !== 'type' && name !== 'id') { newScript.setAttribute(name, attributes[attr].nodeValue); } } Loading @@ -38,10 +37,10 @@ var self = this; document.addEventListener('cookiesjsrUserConsent', function (event) { var service = (typeof event.detail.services === 'object') ? event.detail.services : {}; if (typeof service['analytics'] !== 'undefined' && service['analytics']) { if (typeof service.analytics !== 'undefined' && service.analytics) { self.activate(context); } }); } } }; })(Drupal); modules/cookies_gtag/js/cookies_gtag.js +5 −5 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ /** * Define defaults. */ Drupal.behaviors.cookies_gtag = { Drupal.behaviors.cookiesGtag = { activate: function () { var $script = $('script#cookies_gtag'); Loading @@ -17,22 +17,22 @@ var newScript = document.createElement('script'); newScript.innerHTML = this.innerHTML; $.each(this.attributes, function( index, attr ) { if (attr.name !== 'type') { if (attr.name !== 'type' && attr.name !== 'id') { newScript.setAttribute(attr.name, attr.value); } }); this.parentNode.replaceChild(newScript, this); }) }); }, attach: function (context) { var self = this; document.addEventListener('cookiesjsrUserConsent', function (event) { var service = (typeof event.detail.services === 'object') ? event.detail.services : {}; if (typeof service['gtag'] !== 'undefined' && service['gtag']) { if (typeof service.gtag !== 'undefined' && service.gtag) { self.activate(context); } }); } } }; })(Drupal, jQuery); modules/cookies_instagram/js/cookies_instagram.js +9 −6 Original line number Diff line number Diff line /** * @file * Defines Javascript behaviors for the cookies module. */; */ (function (Drupal, $) { 'use strict'; /** * Define defaults. */ Drupal.behaviors.cookies_instagram = { Drupal.behaviors.cookiesInstagram = { id: 'instagram', Loading @@ -26,8 +25,12 @@ var src = script.getAttribute('src'); var newScript = document.createElement('script'); newScript.setAttribute('id', id); if (src) newScript.setAttribute('src', src) else newScript.innerHTML = script.innerHTML; if (src) { newScript.setAttribute('src', src); } else { newScript.innerHTML = script.innerHTML; } // Replace script. script.parentNode.replaceChild(newScript, script); } Loading @@ -51,5 +54,5 @@ } }); } } }; })(Drupal, jQuery); modules/cookies_ivw/js/cookies_ivw.js +4 −5 Original line number Diff line number Diff line /** * @file * Defines Javascript behaviors for the cookies module. */; */ (function (Drupal) { 'use strict'; /** * Define defaults. */ Drupal.behaviors.cookies_ivw = { Drupal.behaviors.cookiesIvw = { activate: function () { var scriptIds = [ Loading Loading @@ -37,10 +36,10 @@ var self = this; document.addEventListener('cookiesjsrUserConsent', function (event) { var service = (typeof event.detail.services === 'object') ? event.detail.services : {}; if (typeof service['ivw'] !== 'undefined' && service['ivw']) { if (typeof service.ivw !== 'undefined' && service.ivw) { self.activate(context); } }); } } }; })(Drupal); modules/cookies_matomo/js/cookies_matomo.js +4 −5 Original line number Diff line number Diff line /** * @file * Defines Javascript behaviors for the cookies module. */; */ (function (Drupal) { 'use strict'; /** * Define defaults. */ Drupal.behaviors.cookies_matomo = { Drupal.behaviors.cookiesMatomo = { activate: function () { var scriptIds = [ Loading Loading @@ -37,10 +36,10 @@ var self = this; document.addEventListener('cookiesjsrUserConsent', function (event) { var service = (typeof event.detail.services === 'object') ? event.detail.services : {}; if (typeof service['matomo'] !== 'undefined' && service['matomo']) { if (typeof service.matomo !== 'undefined' && service.matomo) { self.activate(context); } }); } } }; })(Drupal); Loading
modules/cookies_ga/js/cookies_ga.js +5 −6 Original line number Diff line number Diff line /** * @file * Defines Javascript behaviors for the cookies module. */; */ (function (Drupal) { 'use strict'; /** * Define defaults. */ Drupal.behaviors.cookies_ga = { Drupal.behaviors.cookiesGa = { activate: function () { var scriptIds = [ Loading @@ -24,7 +23,7 @@ var attributes = Array.from(script.attributes); for (var attr in attributes) { var name = attributes[attr].nodeName; if (name !== 'type') { if (name !== 'type' && name !== 'id') { newScript.setAttribute(name, attributes[attr].nodeValue); } } Loading @@ -38,10 +37,10 @@ var self = this; document.addEventListener('cookiesjsrUserConsent', function (event) { var service = (typeof event.detail.services === 'object') ? event.detail.services : {}; if (typeof service['analytics'] !== 'undefined' && service['analytics']) { if (typeof service.analytics !== 'undefined' && service.analytics) { self.activate(context); } }); } } }; })(Drupal);
modules/cookies_gtag/js/cookies_gtag.js +5 −5 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ /** * Define defaults. */ Drupal.behaviors.cookies_gtag = { Drupal.behaviors.cookiesGtag = { activate: function () { var $script = $('script#cookies_gtag'); Loading @@ -17,22 +17,22 @@ var newScript = document.createElement('script'); newScript.innerHTML = this.innerHTML; $.each(this.attributes, function( index, attr ) { if (attr.name !== 'type') { if (attr.name !== 'type' && attr.name !== 'id') { newScript.setAttribute(attr.name, attr.value); } }); this.parentNode.replaceChild(newScript, this); }) }); }, attach: function (context) { var self = this; document.addEventListener('cookiesjsrUserConsent', function (event) { var service = (typeof event.detail.services === 'object') ? event.detail.services : {}; if (typeof service['gtag'] !== 'undefined' && service['gtag']) { if (typeof service.gtag !== 'undefined' && service.gtag) { self.activate(context); } }); } } }; })(Drupal, jQuery);
modules/cookies_instagram/js/cookies_instagram.js +9 −6 Original line number Diff line number Diff line /** * @file * Defines Javascript behaviors for the cookies module. */; */ (function (Drupal, $) { 'use strict'; /** * Define defaults. */ Drupal.behaviors.cookies_instagram = { Drupal.behaviors.cookiesInstagram = { id: 'instagram', Loading @@ -26,8 +25,12 @@ var src = script.getAttribute('src'); var newScript = document.createElement('script'); newScript.setAttribute('id', id); if (src) newScript.setAttribute('src', src) else newScript.innerHTML = script.innerHTML; if (src) { newScript.setAttribute('src', src); } else { newScript.innerHTML = script.innerHTML; } // Replace script. script.parentNode.replaceChild(newScript, script); } Loading @@ -51,5 +54,5 @@ } }); } } }; })(Drupal, jQuery);
modules/cookies_ivw/js/cookies_ivw.js +4 −5 Original line number Diff line number Diff line /** * @file * Defines Javascript behaviors for the cookies module. */; */ (function (Drupal) { 'use strict'; /** * Define defaults. */ Drupal.behaviors.cookies_ivw = { Drupal.behaviors.cookiesIvw = { activate: function () { var scriptIds = [ Loading Loading @@ -37,10 +36,10 @@ var self = this; document.addEventListener('cookiesjsrUserConsent', function (event) { var service = (typeof event.detail.services === 'object') ? event.detail.services : {}; if (typeof service['ivw'] !== 'undefined' && service['ivw']) { if (typeof service.ivw !== 'undefined' && service.ivw) { self.activate(context); } }); } } }; })(Drupal);
modules/cookies_matomo/js/cookies_matomo.js +4 −5 Original line number Diff line number Diff line /** * @file * Defines Javascript behaviors for the cookies module. */; */ (function (Drupal) { 'use strict'; /** * Define defaults. */ Drupal.behaviors.cookies_matomo = { Drupal.behaviors.cookiesMatomo = { activate: function () { var scriptIds = [ Loading Loading @@ -37,10 +36,10 @@ var self = this; document.addEventListener('cookiesjsrUserConsent', function (event) { var service = (typeof event.detail.services === 'object') ? event.detail.services : {}; if (typeof service['matomo'] !== 'undefined' && service['matomo']) { if (typeof service.matomo !== 'undefined' && service.matomo) { self.activate(context); } }); } } }; })(Drupal);