diff --git a/js/ebi-global-includes/script/5_ebiFrameworkNotificationBanner.js b/js/ebi-global-includes/script/5_ebiFrameworkNotificationBanner.js index 8f2383655aba507b9282f667ecc3966214343019..447a310b6fa59b592b71f647e79c0bb754490b95 100644 --- a/js/ebi-global-includes/script/5_ebiFrameworkNotificationBanner.js +++ b/js/ebi-global-includes/script/5_ebiFrameworkNotificationBanner.js @@ -75,9 +75,12 @@ var dataProtectionSettings = new Object(); * @param {string} [targetedFrameworkVersion=generic] targeted Framework version; options: 1.1, 1.2, 1.3, compliance */ function ebiFrameworkRunDataProtectionBanner(targetedFrameworkVersion) { - targetedFrameworkVersion = targetedFrameworkVersion || newDataProtectionNotificationBanner.src.split('legacyRequest=')[1] || 'generic'; try { + if (typeof newDataProtectionNotificationBanner !== "undefined") { + targetedFrameworkVersion = targetedFrameworkVersion || newDataProtectionNotificationBanner.src.split('legacyRequest=')[1] || 'generic'; + } + // remove any old style cookie banner switch (targetedFrameworkVersion) { case '1.1': @@ -94,7 +97,7 @@ function ebiFrameworkRunDataProtectionBanner(targetedFrameworkVersion) { document.body.style.paddingTop = 0; break; default: - console.warn('You should specify the targetedFrameworkVersion'); + console.warn('You should specify the targeted FrameworkVersion'); } @@ -139,4 +142,4 @@ function ebiFrameworkCookieBanner() { } // execute -ebiFrameworkRunDataProtectionBanner('1.3'); +// ebiFrameworkRunDataProtectionBanner('1.3'); diff --git a/js/ebi-global-includes/script/6_ebiFrameworkInvokeScripts.js b/js/ebi-global-includes/script/6_ebiFrameworkInvokeScripts.js index 13746e5e278e9492eef0a9af071ef2349648110f..1e508c082eff1fd8c83b53a89ea7a743d2beb82b 100644 --- a/js/ebi-global-includes/script/6_ebiFrameworkInvokeScripts.js +++ b/js/ebi-global-includes/script/6_ebiFrameworkInvokeScripts.js @@ -16,7 +16,7 @@ function ebiFrameworkInvokeScripts() { ebiFrameworkUpdateFoot(); ebiFrameworkUpdateFooterMeta(); ebiFrameworkIncludeAnnouncements(); - ebiFrameworkRunDataProtectionBanner(); + ebiFrameworkRunDataProtectionBanner('1.3'); } document.addEventListener("DOMContentLoaded", function(event) {