Skip to content

Commit 6b94814

Browse files
committed
feat: add cache-busting timestamp to loader logo to trigger animation restart on reload
1 parent f251842 commit 6b94814

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

docs/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,19 @@ <h3>No project upload</h3>
12421242
await loadReleaseData();
12431243
}
12441244

1245+
// Force animated SVG to restart on reload
1246+
const loaderLogo = document.querySelector(".loader-logo");
1247+
if (loaderLogo) {
1248+
const timestamp = Date.now();
1249+
const picture = loaderLogo.closest("picture");
1250+
if (picture) {
1251+
picture.querySelectorAll("source").forEach(s => {
1252+
if (s.srcset) s.srcset = s.srcset.split("?")[0] + "?t=" + timestamp;
1253+
});
1254+
}
1255+
loaderLogo.src = loaderLogo.src.split("?")[0] + "?t=" + timestamp;
1256+
}
1257+
12451258
document.body.classList.remove("loaded");
12461259

12471260
window.addEventListener("load", () => {

0 commit comments

Comments
 (0)