Skip to content

Instantly share code, notes, and snippets.

@r7kamura
Last active June 19, 2024 00:27
Show Gist options
  • Save r7kamura/e4823b4f022849829ed9da9f0386edfc to your computer and use it in GitHub Desktop.
Save r7kamura/e4823b4f022849829ed9da9f0386edfc to your computer and use it in GitHub Desktop.
How to modify pomodoro-time.html.
diff --git a/docs/pomodoro-timer.html b/docs/pomodoro-timer.html
index fcc18c3..047c024 100644
--- a/docs/pomodoro-timer.html
+++ b/docs/pomodoro-timer.html
@@ -124,11 +124,7 @@
const interval = parameters.work + parameters.break;
const minutesInInterval = minutes % interval;
const sessionNumber = (date.getHours() - 5) % 24;
- if (minutesInInterval < parameters.work) {
- return `POMODORO#${sessionNumber}`;
- } else {
- return `BREAK#${sessionNumber}`;
- }
+ return `Session ${sessionNumber} / 6`;
}
function calculateTimerClassName(parameters) {
diff --git a/docs/pomodoro-timer.html b/docs/pomodoro-timer.html
index fcc18c3..e88a0e6 100644
--- a/docs/pomodoro-timer.html
+++ b/docs/pomodoro-timer.html
@@ -171,7 +171,7 @@
timerElement.className = calculateTimerClassName(parameters);
const sessionElement = document.getElementById("timer-label-description")
- sessionElement.textContent = calculateSessionText(parameters);
+ sessionElement.textContent = "​";
const remainingPathElement = document.getElementById("timer-circle-outer");
remainingPathElement.setAttribute("stroke-dasharray", calculateRemainingPathDashArray(parameters));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment