Updated to reflect changes request

This commit is contained in:
Amer Almadani 2016-10-07 16:52:13 +03:00 committed by GitHub
parent 9b06b00379
commit e8dda0b0cb
1 changed files with 10 additions and 15 deletions

View File

@ -256,20 +256,16 @@ haste.prototype.lockDocument = function() {
});
};
haste.prototype.configureButtons = function() {
var _this = this;
var includeAlt = navigator.appVersion.indexOf("Mac")!=-1;
var includeAlt = navigator.appVersion.indexOf("Mac")!== -1;
function isShortcutFor(evt, keycode) {
return includeAlt ? evt.ctrlKey && evt.keyCode === keycode : evt.ctrlKey && evt.altKey && evt.keyCode === keycode
}
return evt.ctrlKey && evt.keyCode === keycode && (!includeAlt || evt.altKey);
};
function shortcutDescFor(letter) {
return includeAlt ? 'control + ' + letter : 'control + alt + ' + letter
}
return includeAlt ? 'control + ' + letter : 'control + alt + ' + letter;
};
this.buttons = [
{
@ -406,5 +402,4 @@ $(function() {
}
}
});
});