From 6cc344e0db33ea7bf62eb022b484f20e053b4604 Mon Sep 17 00:00:00 2001 From: CodeDevMLH <145071728+CodeDevMLH@users.noreply.github.com> Date: Tue, 24 Feb 2026 19:24:18 +0100 Subject: [PATCH] Refactor toggleSnowstorm function: streamline observer setup by removing unnecessary comments --- Jellyfin.Plugin.Seasonals/Web/snowstorm.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Jellyfin.Plugin.Seasonals/Web/snowstorm.js b/Jellyfin.Plugin.Seasonals/Web/snowstorm.js index f3e4eae..7cc8e0c 100644 --- a/Jellyfin.Plugin.Seasonals/Web/snowstorm.js +++ b/Jellyfin.Plugin.Seasonals/Web/snowstorm.js @@ -49,12 +49,10 @@ function toggleSnowstorm() { // observe changes in the DOM const observer = new MutationObserver(toggleSnowstorm); - -// start observation observer.observe(document.body, { - childList: true, // observe adding/removing of child elements - subtree: true, // observe all levels of the DOM tree - attributes: true // observe changes to attributes (e.g. class changes) + childList: true, + subtree: true, + attributes: true }); let resizeObserver; // Observer for resize events