Merge pull request #222 from anubisthejackle/issue80

This commit is contained in:
Blake Grotewold
2015-02-09 19:37:10 -05:00
7 changed files with 58 additions and 33 deletions
+27 -2
View File
@@ -74,7 +74,8 @@
state: null,
debug: false,
log: false,
dropbox: false
dropbox: false,
doubleTime: false
},
init: function(options) {
@@ -137,7 +138,19 @@
.text(_('lights off.'))
.click(Engine.turnLightsOff)
.appendTo(menu);
$('<span>')
.addClass('menuBtn')
.text(_('hyper.'))
.click(function(){
Engine.options.doubleTime = !Engine.options.doubleTime;
if(Engine.options.doubleTime)
$(this).text(_('classic.'));
else
$(this).text(_('hyper.'));
})
.appendTo(menu);
$('<span>')
.addClass('menuBtn')
.text(_('restart.'))
@@ -680,7 +693,19 @@
if(lang && typeof Storage != 'undefined' && localStorage) {
localStorage.lang = lang;
}
},
setTimeout: function(callback, timeout, skipDouble){
if( Engine.options.doubleTime && !skipDouble ){
Engine.log('Double time, cutting timeout in half');
timeout /= 2;
}
return setTimeout(callback, timeout);
}
};
function eventNullifier(e) {