@@ -25,7 +25,7 @@ const mZero = document.getElementById('m-zero');
2525const colon = document . getElementById ( 'colon' ) ;
2626
2727let startCountdown ;
28- // let pauseCountdown = false;
28+
2929let timeUp = false ;
3030pauseBtn . disabled = true ;
3131pauseBtn . style . color = 'grey' ;
@@ -61,10 +61,6 @@ function reset() {
6161 TimeUpMessage . classList . replace ( 'show' , 'hide' ) ;
6262 minutes . classList . replace ( 'hide' , 'show' ) ;
6363 seconds . classList . replace ( 'hide' , 'show' ) ;
64- // if (TimeUpMessage.classList.contains('show')) {
65- // mZero.classList.replace('show', 'hide');
66- // sZero.classList.replace('show', 'hide');
67- // }
6864 startCountdown = undefined ;
6965 location . reload ( ) ;
7066}
@@ -76,31 +72,18 @@ pauseBtn.addEventListener('click', function () {
7672 pauseBtn . style . display = 'none' ;
7773 stopCountdown ( ) ;
7874 startCountdown = undefined ;
79- // pauseCountdown = true;
8075} ) ;
8176arrowUp . addEventListener ( 'click' , function ( ) {
8277 if ( startCountdown === undefined ) {
8378 minutes . innerText ++ ;
8479 sessionLength . innerText ++ ;
8580 }
86- // } else {
87- // alert('running');
88- // }
89- // if (pauseCountdown === true) {
90- // alert('running');
91- // }
9281} ) ;
9382arrowDown . addEventListener ( 'click' , function ( ) {
9483 if ( startCountdown === undefined && minutes . innerText > 0 ) {
9584 minutes . innerText -- ;
9685 sessionLength . innerText -- ;
9786 }
98- // } else {
99- // alert('running');
100- // }
101- // if (pauseCountdown === true) {
102- // alert('running');
103- // }
10487} ) ;
10588
10689function play ( ) {
@@ -125,9 +108,7 @@ function play() {
125108
126109 document . querySelector ( 'html' ) . addEventListener ( 'click' , reset ) ;
127110 }
128- // if (TimeUpMessage.classList.contains('show')) {
129111
130- // }
131112 if ( seconds . innerText >= 0 && seconds . innerText < 10 && timeUp == false ) {
132113 sZero . style . display = 'inline' ;
133114 } else {
0 commit comments