From 0637a21eb7c12845ca4c4918374454575c14d158 Mon Sep 17 00:00:00 2001 From: KoloMl Date: Sun, 26 May 2024 05:11:02 +0400 Subject: [PATCH] Calling resize event to recalculate media boxes positions --- src/content/listing.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/content/listing.js b/src/content/listing.js index 56e62c7..989a97d 100644 --- a/src/content/listing.js +++ b/src/content/listing.js @@ -10,4 +10,9 @@ document.querySelectorAll('.media-box').forEach(mediaBoxElement => { createMaintenanceStatusIcon(), ) ]); + + // Attempt to fix misplacement of media boxes + requestAnimationFrame(() => { + window.dispatchEvent(new CustomEvent('resize')); + }) });