fix: prevent iframe flash on Load images or Trust sender

This commit is contained in:
Linus Rath
2026-04-29 18:29:48 +02:00
parent 0b6fdcabfb
commit 0f6e4f995f
3 changed files with 85 additions and 23 deletions
+1
View File
@@ -151,6 +151,7 @@ export function collapseBlockedImageContainers(html: string): string {
const hasVisibleMedia = el.querySelector('img:not([data-blocked-src]), video, canvas');
const hasLinks = el.querySelector('a[href]');
if (!hasVisibleText && !hasVisibleMedia && !hasLinks) {
el.setAttribute('data-blocked-collapsed-style', el.style.cssText);
el.style.display = 'none';
el.style.height = '0';
el.style.padding = '0';