Skip to content

Commit

Permalink
added bell, alert messages dissapear
Browse files Browse the repository at this point in the history
  • Loading branch information
leroidubuffet committed May 16, 2023
1 parent 504b186 commit 7f8d960
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ It works best if added to your home screen on Android. Most browsers support thi

## Features

- Set a timer with a custom duration.
- Double click to reset the timer.
- Visual indicators show when half the time has passed, and when there are five minutes and one minute remaining.
- Audio indicators play when visual indicators are shown, and when the timer ends.
- Set a timer with a custom duration
- Double click to reset the timer
- Visual indicators show when half the time has passed, and when there are five minutes and one minute remaining
- Audio indicators play when the timer ends

## How to Use

1. Double click on the minutes or seconds to set the duration for the timer. Choose and click on the number.
2. Click on the timer to start or stop the timer.
3. Double click on the : separator to reset the timer.
1. Double click on the minutes or seconds to set the duration for the timer. Drag and click on the number
2. Click on the timer to start or stop the timer
3. Double click on the : separator to reset the timer

## Installation

Expand Down
11 changes: 10 additions & 1 deletion src/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,21 @@ function startTimer(minutes, seconds) {
if (timeLeft === halfTime && totalTime >= 120) {
hideAllMessages();
halfTimeGoneElement.classList.remove('hidden');
setTimeout(function() {
halfTimeGoneElement.classList.add('hidden');
}, 30000);
} else if (timeLeft === fiveMinutesLeft && totalTime >= 600) {
hideAllMessages();
fiveMinutesLeftElement.classList.remove('hidden');
setTimeout(function() {
fiveMinutesLeftElement.classList.add('hidden');
}, 30000);
} else if (timeLeft === oneMinuteLeft && totalTime >= 180) {
hideAllMessages();
oneMinuteLeftElement.classList.remove('hidden');
oneMinuteLeftElement.classList.remove('hidden');
setTimeout(function() {
oneMinuteLeftElement.classList.add('hidden');
}, 30000);
} else if (timeLeft === 0) {
hideAllMessages();
}
Expand Down

0 comments on commit 7f8d960

Please sign in to comment.