summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spw+git@sdf.org>2014-11-12 14:48:02 +0900
committerSean Whitton <spw+git@sdf.org>2014-11-12 14:48:02 +0900
commit29a618e315bc3a60cde3caeee76d851b2fd5d261 (patch)
treeda4e333e6b687c05bb1c590f61e772105a8ba77b
parent33ceed50e3f44368d989ae9aabac9033a40f9c51 (diff)
downloadschoolclock-29a618e315bc3a60cde3caeee76d851b2fd5d261.tar.gz
improve hotkey choice
-rw-r--r--index.html10
-rw-r--r--js/main.js6
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 @@
<br />
<a id="timeWastingClockGo" class="btn btn-primary btn-lg
- btn-block">Start timer (Hotkey: j)</a>
+ btn-block">Start <u>t</u>imer</a>
<a id="timeWastingClockReset" class="btn btn-default btn-lg
- btn-block">Reset timer (end of class)</a>
+ btn-block">Re<u>s</u>et timer (end of class)</a>
</div>
<div class="col-md-6">
<h1>Activity time</h1><br />
@@ -74,12 +74,12 @@
</p>
<p class="text-center">
- <a id="activityClockCustom" class="btn btn-default btn-lg">Custom</a>
- <a id="activityClockReset" class="btn btn-default btn-lg">Reset</a>
+ <a id="activityClockCustom" class="btn btn-default btn-lg"><u>C</u>ustom</a>
+ <a id="activityClockReset" class="btn btn-default btn-lg"><u>R</u>eset</a>
</p>
<p class="text-center">
- 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.
</p>
</div>
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 <u>t</u>imer');
timeWastingClock.stop();
$timeWastingClockRunning = false;
}
else
{
- $('#timeWastingClockGo').html('Stop timer (Hotkey: j)');
+ $('#timeWastingClockGo').html('Stop <u>t</u>imer');
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)