chore: Use Nextcloud variables otherwise fallback to default

This commit is contained in:
Rene Hampölz 2023-05-31 12:41:00 +00:00
parent a65415a276
commit cb42124eb2
3 changed files with 416 additions and 450 deletions

View file

@ -10,6 +10,7 @@
document.onreadystatechange = () => {
if (document.readyState === 'complete') {
watchIFrameTitle();
passThemesToIFrame();
let form = document.querySelector('form.snappymail');
form && SnappyMailFormHelper(form);
}
@ -17,7 +18,7 @@ document.onreadystatechange = () => {
// Pass Nextcloud themes and theme attributes to SnappyMail on
// first load and when the SnappyMail iframe is reloaded.
document.addEventListener('DOMContentLoaded', () => {
function passThemesToIFrame() {
const iframe = document.getElementById('rliframe');
if (!iframe) return;
@ -32,7 +33,7 @@ document.addEventListener('DOMContentLoaded', () => {
});
passThemes(iframe);
});
}
// Pass Nextcloud themes and theme attributes to SnappyMail.
function passThemes(iframe) {