From 0039f102d03cd930a7694bc3a8bd90916e2dacf8 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 27 Apr 2025 12:41:47 +0200 Subject: fix chapter scrolling during load --- web/script/player/mod.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/script/player/mod.ts b/web/script/player/mod.ts index 32ad355..6e3f962 100644 --- a/web/script/player/mod.ts +++ b/web/script/player/mod.ts @@ -210,7 +210,7 @@ function initialize_player(node_id: string): HTMLElement { pri = e("div", { class: "jsp-pri" }, pri_current = e("div", { class: "jsp-pri-current" }), chapters.liftA2(player.duration, - (chapters, duration) => e("div", ...chapters.map(chap => e("div", { + (chapters, duration) => duration == 0 ? e("div") : e("div", ...chapters.map(chap => e("div", { class: "jsp-chapter", style: { left: pri_map(chap.time_start ?? 0), -- cgit v1.2.3-70-g09d2