From 6301625e52fd9cc4b675e6896cf8666d876edb33 Mon Sep 17 00:00:00 2001 From: Ken Hawkins Date: Mon, 21 May 2018 13:40:38 +0100 Subject: [PATCH] Update compiled --- js/script.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/js/script.js b/js/script.js index 454f8b5e..276ee668 100644 --- a/js/script.js +++ b/js/script.js @@ -325,6 +325,19 @@ function ebiFrameworkCookieBanner() { init(); } +// Use the v1.3 data protection banner on older sites +function legacyDataProtectionBanner() { + var localFrameworkVersion = '1.2'; // 1.1 or 1.2 or compliance or other + // if you select compliance or other we will add some helpful + // CSS styling, but you may need to add some CSS yourself + var newDataProtectionNotificationBanner = document.createElement('script'); + newDataProtectionNotificationBanner.src = 'https://dev.ebi.emblstatic.net/web_guidelines/EBI-Framework/v1.3/js/ebi-global-includes/script/5_ebiFrameworkNotificationBanner.js?legacyRequest='+localFrameworkVersion; + document.head.appendChild(newDataProtectionNotificationBanner); + newDataProtectionNotificationBanner.onload = function() { + ebiFrameworkRunDataProtectionBanner(); // invoke the banner + }; +} + function ebiFrameworkInvokeScripts() { ebiFrameworkExternalLinks(); ebiFrameworkManageGlobalSearch(); @@ -335,7 +348,8 @@ function ebiFrameworkInvokeScripts() { ebiFrameworkUpdateFoot(); ebiFrameworkUpdateFooterMeta(); ebiFrameworkIncludeScripts(); - ebiFrameworkCookieBanner(); + // ebiFrameworkCookieBanner(); + legacyDataProtectionBanner(); } /* All scripts are automatically loaded, unless the page asked us not to.