diff --git a/src/email-recovery.js b/src/email-recovery.js index 1e053d7671f4f81239640e3ce4a99d6d3e620b33..37df6a4dcea79a619e3292ead45583912ce0d560 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -30,6 +30,23 @@ document.addEventListener('DOMContentLoaded', function() { if (contentVue) { contentVue.classList.add('recovery-content-layout') contentVue.style.setProperty('--recovery-banner-height', topHeight) + /* + * Deck seems to reset class list, this restores 'recovery-content-layout' class name if another script removes it from classlist + */ + if (window.location.href.includes('apps/deck/')) { + const observer = new MutationObserver(function(mutations) { + mutations.forEach(function(mutation) { + if (mutation.type === 'attributes' && mutation.attributeName === 'class') { + if (banner && !banner.classList.contains('recovery-banner-hidden') && !contentVue.classList.contains('recovery-content-layout')) { + contentVue.classList.add('recovery-content-layout') + } + } + }) + }) + observer.observe(contentVue, { + attributes: true + }) + } } } // added special case for bookmarks and passwords