diff --git a/Jellyfin.Plugin.Seasonals/Web/santa.js b/Jellyfin.Plugin.Seasonals/Web/santa.js index 2a26abe..f2054f2 100644 --- a/Jellyfin.Plugin.Seasonals/Web/santa.js +++ b/Jellyfin.Plugin.Seasonals/Web/santa.js @@ -310,8 +310,8 @@ function initializeSanta() { } const container = document.querySelector('.santa-container'); if (container) { - const screenWidth = window.innerWidth; // get the screen width to detect mobile devices - if (screenWidth < 768) { // lower count of snowflakes on mobile devices + const isMobile = window.matchMedia("only screen and (max-width: 768px)").matches; // check if mobile device + if (isMobile) { // lower count of snowflakes on mobile devices isMobile = true; console.log('Mobile device detected. Reducing snowflakes count.'); snowflakesCount = snowflakesCountMobile;