Mercurial > hg > nodescore
diff www/m/js/nodescore-client.js @ 19:a56434dee146
toggleable divs and clean up
author | tzara <rc-web@kiben.net> |
---|---|
date | Mon, 09 Jul 2012 19:18:47 +0100 |
parents | 6ad0cde69558 |
children | 9daa1ac0af33 |
line wrap: on
line diff
--- a/www/m/js/nodescore-client.js Mon Jul 09 11:02:42 2012 +0100 +++ b/www/m/js/nodescore-client.js Mon Jul 09 19:18:47 2012 +0100 @@ -98,11 +98,29 @@ } $(document).keypress(function(e){ + // "space bar" for next unit preview var checkWebkitandIE=(e.which==32 ? 1 : 0); var checkMoz=(e.which==32 ? 1 : 0); - if (checkWebkitandIE || checkMoz) { - toggle_visibility('preview') - } + // "m" button for metronome + var mcheckWebkitandIE=(e.which==109 ? 1 : 0); + var mcheckMoz=(e.which==109 ? 1 : 0); + // "s" button for stopwatch/chronometer + var ccheckWebkitandIE=(e.which==115 ? 1 : 0); + var ccheckMoz=(e.which==115 ? 1 : 0); + + // "h" button for hideall + var hcheckWebkitandIE=(e.which==104 ? 1 : 0); + var hcheckMoz=(e.which==104 ? 1 : 0); + + console.log(e.which); + if (checkWebkitandIE || checkMoz) { toggle_visibility('preview') } + if (mcheckWebkitandIE || mcheckMoz) { toggle_visibility('metro') } + if (ccheckWebkitandIE || ccheckMoz) { toggle_visibility('client_chronometer') } + if (hcheckWebkitandIE || hcheckMoz) { + toggle_visibility('client_chronometer') + toggle_visibility('metro') + toggle_visibility('preview') +} }); ////////////////////////////////////////////////