Merge pull request #763 from keepassxreboot/fix/show_banner_only_in_main_page

Show Credential banner only in the main page
This commit is contained in:
Sami Vänttinen 2020-02-09 16:56:02 +02:00 committed by GitHub
commit 5c9abcd8e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -118,7 +118,11 @@ kpxcBanner.create = async function(credentials = {}) {
banner.appendMultiple(bannerInfo, bannerButtons);
initColorTheme(banner);
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 = {}) {