Hi guys,.
I installed the theme following the intructions, the slideshow renders correctly and displays the first slide, but does not advance automatically. Manual navigation via arrows or pagination dots works as expected. The auto-advance timer never starts after initialization.
In SlideshowManager.loadSlideshowData(), the SlideTimer is instantiated but never explicitly started:
STATE.slideshow.slideInterval = new SlideTimer(
() => { if (!STATE.slideshow.isPaused) this.nextSlide(); },
CONFIG.shuffleInterval
);
// Let VisibilityObserver start it initially ← timer is never started
The code relies on VisibilityObserver.updateVisibility() to call .start(), but that method only does so when slideInterval.paused === true:
if (shouldBeVisible && !STATE.slideshow.isPaused) {
if (STATE.slideshow.slideInterval.paused) { // ← evaluates to false
STATE.slideshow.slideInterval.start(); // ← never reached
}
}
The newly created SlideTimer has paused = false and timerId = null by default — an inconsistent state that bypasses the start condition entirely. Since paused is false, updateVisibility() assumes the timer is already running, but timerId is null, meaning it was never actually started.
Suggested Fix
In SlideshowManager.loadSlideshowData(), after creating the SlideTimer, explicitly set paused = true before delegating to VisibilityObserver, so the start condition is correctly evaluated:
STATE.slideshow.slideInterval = new SlideTimer(
() => { if (!STATE.slideshow.isPaused) this.nextSlide(); },
CONFIG.shuffleInterval
);
STATE.slideshow.slideInterval.paused = true; // ← ensure consistent initial state
// VisibilityObserver will now correctly call .start()
Alternatively, call .start() directly after creation and let VisibilityObserver handle pausing if needed:
STATE.slideshow.slideInterval = new SlideTimer(
() => { if (!STATE.slideshow.isPaused) this.nextSlide(); },
CONFIG.shuffleInterval
).start(); // ← explicit start
Workaround
The following script injected into index.html after the slideshowpure.js tag resolves the issue:
<script>
(function() {
let attempts = 0;
function patchSlideshow() {
attempts++;
const sp = window.slideshowPure;
const s = sp?.STATE?.slideshow;
if (!s || !s.hasInitialized || s.totalItems === 0) {
if (attempts < 30) setTimeout(patchSlideshow, 1000);
return;
}
if (s.slideInterval && (s.slideInterval.paused || !s.slideInterval.timerId) && !s.isPaused) {
s.slideInterval.remaining = s.slideInterval.interval;
s.slideInterval.start();
}
}
setTimeout(patchSlideshow, 4000);
})();
</script>
Hi guys,.
I installed the theme following the intructions, the slideshow renders correctly and displays the first slide, but does not advance automatically. Manual navigation via arrows or pagination dots works as expected. The auto-advance timer never starts after initialization.
In
SlideshowManager.loadSlideshowData(), the SlideTimer is instantiated but never explicitly started:The code relies on
VisibilityObserver.updateVisibility()to call.start(), but that method only does so whenslideInterval.paused === true:The newly created SlideTimer has
paused = falseandtimerId = nullby default — an inconsistent state that bypasses the start condition entirely. Since paused is false,updateVisibility()assumes the timer is already running, buttimerIdis null, meaning it was never actually started.Suggested Fix
In
SlideshowManager.loadSlideshowData(), after creating the SlideTimer, explicitly setpaused = truebefore delegating toVisibilityObserver, so the start condition is correctly evaluated:Alternatively, call
.start()directly after creation and letVisibilityObserverhandle pausing if needed:Workaround
The following script injected into
index.htmlafter theslideshowpure.jstag resolves the issue: