Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Closer2U/just-breathe into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Closer2U committed Feb 28, 2024
2 parents becb6f2 + b430502 commit 8489de6
Showing 1 changed file with 1 addition and 34 deletions.
35 changes: 1 addition & 34 deletions js/timer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
function startTimer(duration, display) {
startMinute();
var timer = duration, minutes, seconds;

var interval = setInterval(function () {
minutes = parseInt(timer / 60, 10)
seconds = parseInt(timer % 60, 10);
Expand All @@ -24,43 +23,11 @@ function startTimer(duration, display) {
fade();
}


//window.onload = function () {
// document.getElementById("Pulse").onclick = function () {
function startMinute() {
var oneMinute = 60,
display = document.getElementById('Timer');
startTimer(oneMinute, display);
};



/* *function fadeTimer() {
console.log("Display: ")
var fadeEffect = setInterval(function () {
if (!display.style.opacity) {
display.style.opacity = 1;
}
if (display.style.opacity > 0) {
display.style.opacity -= 0.05;
} else {
clearInterval(fadeEffect);
}
}, 100);
}
**/
/**
window.onclick = function showTimer () {
console.log("Display2: ")
//TODO fix damit man den Timer wieder einblenden kann
var showEffect = setInterval(function () {
if (!display.style.opacity) {
display.style.opacity = 1;
}
if (display.style.opacity < 1) {
display.style.opacity += 0.5;
} else {
clearInterval(showEffect);
}
}, 100);
}
**/

0 comments on commit 8489de6

Please sign in to comment.