diff --git a/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.css b/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.css index 032becb..969a8db 100644 --- a/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.css +++ b/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.css @@ -749,6 +749,14 @@ left: 50%; transform: translateX(-50%) scale(0.8); background-color: #ffffff00; + width: max-content; + max-width: 90vw; + flex-wrap: nowrap; + overflow: hidden; + } + + .dot { + flex-shrink: 0; } .dot.active { diff --git a/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js b/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js index 69bee98..5b2ae74 100644 --- a/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js +++ b/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js @@ -1,4 +1,4 @@ -/* +/* * Jellyfin Slideshow by M0RPH3US v4.0.1 * Modified by CodeDevMLH * @@ -2363,8 +2363,17 @@ const SlideshowManager = { const totalItems = STATE.slideshow.totalItems || 0; + // dynamically lower the max dots threshold on small screens + let effectiveMaxDots = CONFIG.maxPaginationDots; + if (window.matchMedia("(max-width: 767px) and (orientation: portrait)").matches) { + const availableWidth = window.innerWidth * 0.9; + const dotWidth = 18; // approximate width per dot + const fittingDots = Math.floor(availableWidth / dotWidth) - 1; + effectiveMaxDots = Math.min(effectiveMaxDots, fittingDots); + } + // Switch to counter style if too many items - if (totalItems > CONFIG.maxPaginationDots) { + if (totalItems > effectiveMaxDots) { const counter = document.createElement("span"); counter.className = "slide-counter"; counter.id = "slide-counter";