From 135ec50a7700335332578edbe2cb8434f848d290 Mon Sep 17 00:00:00 2001 From: zlg Date: Thu, 28 Aug 2025 00:04:51 -0700 Subject: Add 'labeled_bar' style This style is similar to the Persona 5-inspired style, but isn't as purpose-built. --- timer.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'timer.js') diff --git a/timer.js b/timer.js index c947036..c40bd4b 100644 --- a/timer.js +++ b/timer.js @@ -21,6 +21,18 @@ function setupCountdown() { `; break; + case "labeled_bar": + var label_text = params.get("label_text"); + page.innerHTML = ` +
${label_text}
+
+
+
00
+
:
+
00
+
+ `; + break; case "bar": page.innerHTML = `
@@ -50,7 +62,7 @@ function setupCountdown() { cd.style.fontFamily = params.get("f_family"); } cd.style.color = params.get("f_color"); - if (params.get("cdstyle") == "bar" || params.get("cdstyle") == "p5") { + if (params.get("cdstyle") == "labeled_bar" || params.get("cdstyle") == "bar" || params.get("cdstyle") == "p5") { document.getElementById("progress").style.backgroundColor = params.get("b_color"); } @@ -72,7 +84,7 @@ function tick() { } cur_seconds--; draw(); - if (params.get("cdstyle") == "bar" || params.get("cdstyle") == "p5") { + if (params.get("cdstyle") == "labeled_bar" || params.get("cdstyle") == "bar" || params.get("cdstyle") == "p5") { draw_bar(); } } -- cgit v1.2.3-54-g00ecf