Skip to content

Commit

Permalink
Tweaks to build process, added ctrl/cmd rather than ctrl in one case,…
Browse files Browse the repository at this point in the history
… minor version patch increase
  • Loading branch information
MentalAtom committed Mar 14, 2014
1 parent e868725 commit 35253a2
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assets/dist/EasyTimer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/dist/EasyTimer_ManageTask.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/dist/EasyTimer_ViewTask.min.js

Large diffs are not rendered by default.

13 changes: 11 additions & 2 deletions assets/js/key.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
THREE: 51,
FOUR: 52,
FIVE: 53,
SIX: 54
SIX: 54,
KONAMI: "38,38,40,40,37,39,37,39,66,65"
},
matchesShortcut;
matchesShortcut,
kPress = [];

timer.shortCuts = {
"SUBMIT" : [keys.CTRL, keys.ENT],
Expand Down Expand Up @@ -87,11 +89,18 @@

$(document).on("keydown", function (e) {

kPress.push(e.which);

if (matchesShortcut(e)) {
e.preventDefault();
$(document).trigger("keyCombo", {"combo" : matchesShortcut(e)});
}

if (kPress.toString().indexOf(keys.KONAMI) >= 0) {
$(document).trigger("konami");
kPress = [];
}

});

$(document).on("keyCombo", function (e, data) {
Expand Down
27 changes: 27 additions & 0 deletions assets/js/konami.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
$(function () {

"use strict";

var bd = $("body");

$(document).on("konami", function () {

bd.css({
"transition": "-webkit-transform 3s ease-in-out",
"-webkit-transform": "rotate(720deg)",
"overflow": "hidden"
});

setTimeout(function () {

bd.css({
"transition": "none",
"-webkit-transform": "rotate(0deg)",
"overflow": "visible"
});

}, 3000);

});

});
3 changes: 2 additions & 1 deletion grunt/concat.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ module.exports = {
'assets/js/key.js',
'assets/js/state.js',
'assets/js/tasks.js',
'assets/js/notify.js'
'assets/js/notify.js',
'assets/js/konami.js'
],
'assets/dist/src/EasyTimer_ViewTask.js' : [
'assets/js/lib/jquery.js',
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ <h3>Settings</h3>

<div id="shortcutMenu" class="reveal-modal" data-reveal>

<p><kbd>Ctrl</kbd> + <kbd>Enter</kbd> - Send time</p>
<p><kbd>Ctrl/Cmd</kbd> + <kbd>Enter</kbd> - Send time</p>
<p><kbd>Space</kbd> - Start/Stop timer</p>
<p><kbd>Ctrl/Cmd</kbd> + <kbd>F</kbd> - Filter Projects
<p><kbd>F5</kbd> or <kbd>Ctrl/Cmd</kbd> + <kbd>R</kbd> - Refresh projects</p>
Expand Down

0 comments on commit 35253a2

Please sign in to comment.