From 29a618e315bc3a60cde3caeee76d851b2fd5d261 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 12 Nov 2014 14:48:02 +0900 Subject: improve hotkey choice --- index.html | 10 +++++----- js/main.js | 6 ++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 5b72d5f..f2a1f26 100644 --- a/index.html +++ b/index.html @@ -53,9 +53,9 @@
Start timer (Hotkey: j) + btn-block">Start timer Reset timer (end of class) + btn-block">Reset timer (end of class)

Activity time


@@ -74,12 +74,12 @@

- Custom - Reset + Custom + Reset

- Hotkey: press the number key for the number of minutes you want + Hotkeys: press the number key for the number of minutes you want to countdown.

diff --git a/js/main.js b/js/main.js index ed20376..9a1e424 100644 --- a/js/main.js +++ b/js/main.js @@ -51,19 +51,21 @@ function timeWastingClockToggle() { if ($timeWastingClockRunning) { - $('#timeWastingClockGo').html('Start timer (Hotkey: j)'); + $('#timeWastingClockGo').html('Start timer'); timeWastingClock.stop(); $timeWastingClockRunning = false; } else { - $('#timeWastingClockGo').html('Stop timer (Hotkey: j)'); + $('#timeWastingClockGo').html('Stop timer'); timeWastingClock.start(); $timeWastingClockRunning = true; } } +$(document).bind('keydown', 't', timeWastingClockToggle); $(document).bind('keydown', 'j', timeWastingClockToggle); + $(document).bind('keydown', 'k', function (){$.ionSound.play("klaxon");}); function activityClockGo($seconds) -- cgit v1.2.3