-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
29 lines (24 loc) · 885 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import {
playHandler,
pauseHandler,
stopHandler,
} from "./components/handlers.js";
import { Start } from "./components/uti.js";
const timeOnScreen = document.querySelector(".time");
const defaulTime = document.querySelectorAll("[data-time]");
const input = document.querySelector('[type="number"]');
const comeBackTime = document.querySelector(".come-back");
const play = document.querySelector(".play");
const pause = document.querySelector(".pause");
const stop = document.querySelector(".stop");
//Event Listeners
defaulTime.forEach((defTime) =>
defTime.addEventListener("click", function () {
const minutesDataset = parseInt(this.dataset.time);
Start(minutesDataset);
})
);
play.addEventListener("click", playHandler);
pause.addEventListener("click", pauseHandler);
stop.addEventListener("click", stopHandler);
export { timeOnScreen, comeBackTime, input };