Skip to content

Commit

Permalink
Check if logo is present or not
Browse files Browse the repository at this point in the history
  • Loading branch information
felixaschultz committed Sep 29, 2023
1 parent 4b2099c commit dc83585
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cb.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
let ccpa = window.INTA.settings === undefined || window.INTA.settings.ccpa === undefined ? false : window.INTA.settings.ccpa.on;
let ccpaUrl = window.INTA.settings === undefined || window.INTA.settings.ccpa === undefined ? false : window.INTA.settings.ccpa.url;
let cookieColor = window.INTA.settings === undefined || window.INTA.settings.color === undefined || window.INTA.settings.color === false || window.INTA.settings.color.indexOf("[") > -1 || window.INTA.settings.color === "" ? "rgba(0, 51, 153, 1)" : window.INTA.settings.color;
let cookieLogo = window.INTA.settings === undefined || window.INTA.settings.logo === undefined || window.INTA.settings.logo === "" || window.INTA.settings.logo.indexOf("[") > -1 ? intCookieIcon : window.INTA.settings.logo;
let cookieLogo = window.INTA.settings === undefined || window.INTA.settings.logo === undefined || window.INTA.settings.logo === "" || window.INTA.settings.logo.indexOf("[") > -1 ? null : window.INTA.settings.logo;
let backgroundColor = window.INTA.settings === undefined || window.INTA.settings.background_color === undefined ? "#fff" : window.INTA.settings.background_color;
let cookieTextColor = invertColor(backgroundColor);
const checkMarkColor = cookieColor;
Expand Down Expand Up @@ -685,7 +685,7 @@
let CompanyLogoName = cookieLogo == intCookieIcon ? "Cookie Icon" : `${document.domain} logo`;

moreintHeader.innerHTML = `
<img class="intSettingsCompanyLogo${intCookieIconSmallClass}" width="150px" height="auto" src="${cookieLogo}" alt="${CompanyLogoName}">
${typeof logo != "undefined" ? '<img class="intCookie_ConsentLogo-container" src="'+ logo +'" alt="'+ CompanyLogoName +'" title="'+ CompanyLogoName +'">' : ``}
<section class="intSettingsPoweredBy">${poweredBy}</section>`;

cookieSettingsContent.innerHTML = '<intHeader class="intastellarCookie-settings__intHeader"><img src="' + cookieLogo + '" alt="' + CompanyLogoName + '" title="' + CompanyLogoName + '" style="width: 100%;float: left; max-width: 50px;max-height: 50px;object-fit:contain;"><h2>Cookie</h2><button class="intastellarCookie-settings__close" style="background: ' + cookieColor + ';" aria-label="Close cookie banner"></button></intHeader>' +
Expand Down
2 changes: 1 addition & 1 deletion cb.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions gdpr.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -1659,7 +1659,7 @@ function checkCookieStatus() {
german: `Akzeptiere ${scriptTypelang.german} cookies`
}
}
let INTAlogo = (window.INT) ? window.INT.settings.logo : (window.INTA.settings.logo) ? window.INTA.settings.logo : intCookieIcon;
let INTAlogo = (window.INT) ? window.INT.settings.logo : (window.INTA.settings.logo) ? window.INTA.settings.logo : null;
loopBlock(addedNodes, message, script, buttonText, INTAlogo);
});
}
Expand Down Expand Up @@ -1694,7 +1694,7 @@ function checkCookieStatus() {
german: `Akzeptiere ${scriptTypelang.german} cookies`
}
}
let INTAlogo = (window.INT) ? window.INT.settings.logo : (window.INTA.settings.logo) ? window.INTA.settings.logo : intCookieIcon;
let INTAlogo = (window.INT) ? window.INT.settings.logo : (window.INTA.settings.logo) ? window.INTA.settings.logo : null;
loopBlock(addedNodes, message, script, buttonText, INTAlogo);
})
}
Expand Down Expand Up @@ -1730,7 +1730,7 @@ function checkCookieStatus() {
german: `Akzeptiere ${scriptTypelang.german} cookies`
}
}
let INTAlogo = (window.INT) ? window.INT.settings.logo : (window.INTA.settings.logo) ? window.INTA.settings.logo : intCookieIcon;
let INTAlogo = (window.INT) ? window.INT.settings.logo : (window.INTA.settings.logo) ? window.INTA.settings.logo : null;
blockBlockQuotes(tweet, message, script, buttonText, INTAlogo);
})
});
Expand Down

0 comments on commit dc83585

Please sign in to comment.