Browse Source

add beforeunload event to make sure you dont destroy all progress/setup

gh-pages
Brett Langdon 12 years ago
parent
commit
70578bec4c
2 changed files with 5 additions and 1 deletions
  1. +4
    -0
      scripts/main.js
  2. +1
    -1
      scripts/main.min.js

+ 4
- 0
scripts/main.js View File

@ -12,6 +12,10 @@ var elapsed_time = null;
var steps = []; var steps = [];
$(window).bind("beforeunload", function(){
return "Leaving this page will destroy all timer progress and setup";
});
$(document).ready(function(){ $(document).ready(function(){
$('#set').click(start_timer); $('#set').click(start_timer);
$('#stop').click(stop_timer); $('#stop').click(stop_timer);


+ 1
- 1
scripts/main.min.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save