Do not create a duplicate

This commit is contained in:
varjolintu 2020-02-03 10:24:36 +02:00
parent 990e94252e
commit f94711cb1a

View file

@ -118,7 +118,11 @@ kpxcBanner.create = async function(credentials = {}) {
banner.appendMultiple(bannerInfo, bannerButtons);
initColorTheme(banner);
window.parent.document.body.appendChild(banner);
const existingBanner = window.parent.document.body.querySelector('.kpxc-banner');
if (existingBanner === null) {
window.parent.document.body.appendChild(banner);
}
};
kpxcBanner.saveNewCredentials = async function(credentials = {}) {