From 69adc64a44ecc9f6a552ebcbfd4f21796e5f35c3 Mon Sep 17 00:00:00 2001 From: CodeDevMLH <145071728+CodeDevMLH@users.noreply.github.com> Date: Thu, 26 Feb 2026 21:53:34 +0100 Subject: [PATCH] Enhance CSS and JS injection: add cache-buster to prevent caching issues --- Jellyfin.Plugin.Seasonals/Web/test-site.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jellyfin.Plugin.Seasonals/Web/test-site.html b/Jellyfin.Plugin.Seasonals/Web/test-site.html index 28b0ac2..0f96bef 100644 --- a/Jellyfin.Plugin.Seasonals/Web/test-site.html +++ b/Jellyfin.Plugin.Seasonals/Web/test-site.html @@ -511,11 +511,11 @@ const container = document.querySelector('.seasonals-container'); container.className = `seasonals-container ${containerClass}`; - // Inject CSS + // Inject CSS with cache-buster if (cssFile) { const link = document.createElement('link'); link.rel = 'stylesheet'; - link.href = cssFile; + link.href = cssFile + '?v=' + new Date().getTime(); link.setAttribute('data-seasonal', 'true'); link.onerror = () => console.error(`[Test Site] Failed to load CSS: ${cssFile}`); document.head.appendChild(link); @@ -525,7 +525,7 @@ if (jsFile) { setTimeout(async () => { try { - const response = await fetch(jsFile); + const response = await fetch(jsFile + '?v=' + new Date().getTime()); if (!response.ok) throw new Error(`HTTP ${response.status}`); const code = await response.text();