Skip to content

Commit

Permalink
prevent reload functionality add
Browse files Browse the repository at this point in the history
  • Loading branch information
devsayanR committed Mar 21, 2024
1 parent 45105f2 commit 57d3ca5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ let hours = 0, minutes = 0, seconds = 0;
let intervalId;


// window.addEventListener('beforeunload', function (e) {
// e.preventDefault();
// e.returnValue = true;
// });
window.addEventListener('beforeunload', function (e) {
e.preventDefault();
e.returnValue = true;
});


const triggerTimer = () => {
Expand Down

0 comments on commit 57d3ca5

Please sign in to comment.