Skip to content

Commit

Permalink
Update compiled
Browse files Browse the repository at this point in the history
  • Loading branch information
khawkins98 committed May 21, 2018
1 parent fd6ed9c commit 6301625
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -335,7 +348,8 @@ function ebiFrameworkInvokeScripts() {
ebiFrameworkUpdateFoot();
ebiFrameworkUpdateFooterMeta();
ebiFrameworkIncludeScripts();
ebiFrameworkCookieBanner();
// ebiFrameworkCookieBanner();
legacyDataProtectionBanner();
}

/* All scripts are automatically loaded, unless the page asked us not to.
Expand Down

0 comments on commit 6301625

Please sign in to comment.