Skip to content

Commit

Permalink
fix: wrong function call
Browse files Browse the repository at this point in the history
  • Loading branch information
darlanalves authored Aug 21, 2023
1 parent ee4bf04 commit f6f3317
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,20 @@

function startChange() {
lastStamp = Date.now();
console.log(lastStamp);
}

function stopChange() {
if (Date.now() - lastStamp > props.resetTimeout) {
const elapsed = Date.now() - lastStamp;
console.log(lastStamp, elapsed, props.resetTimeout);

if (elapsed > props.resetTimeout) {
main.style.backgroundColor = theme.content = "#ffffff";
return reset();
reset();
return;
}

apply();
changeColor();
}

main.onmousedown = main.ontouchstart = startChange;
Expand Down

0 comments on commit f6f3317

Please sign in to comment.