diff options
Diffstat (limited to 'assets/js/main.js')
-rw-r--r-- | assets/js/main.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/assets/js/main.js b/assets/js/main.js index 1586c5c..5ab3902 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -89,6 +89,9 @@ function startLesson() // set the cookie and reload to start the session createCookie("class_cookie", cookieString, 1); + // reset clock because it's currently dangerous to do so when + // ending a lesson + timeWastingClock.reset(); // reload, preventing Firefox from resubmitting POST data window.location.assign(document.URL.split("#")[0]); } @@ -124,7 +127,9 @@ function endLesson() // submit timeWastingClock.stop(); - timeWastingClock.reset(); + // dangerous to reset clock here in case user inputs wrong + // password: instead reset when *starting* a class + // timeWastingClock.reset(); $form.submit(); } |