Improved builder
This commit is contained in:
@@ -59,7 +59,7 @@ function Acels (client) {
|
||||
return h
|
||||
}
|
||||
this.convert = (event) => {
|
||||
const accelerator = event.key === ' ' ? 'Space' : event.key.substr(0, 1).toUpperCase() + event.key.substr(1)
|
||||
const accelerator = event.key === ' ' ? 'Space' : capitalize(event.key.replace('Arrow', ''))
|
||||
if ((event.ctrlKey || event.metaKey) && event.shiftKey) {
|
||||
return `CmdOrCtrl+Shift+${accelerator}`
|
||||
}
|
||||
@@ -113,6 +113,7 @@ function Acels (client) {
|
||||
this.toggle = () => {
|
||||
this.el.className = this.el.className === 'hidden' ? '' : 'hidden'
|
||||
}
|
||||
function capitalize (s) { return s.substr(0, 1).toUpperCase() + s.substr(1) }
|
||||
}
|
||||
'use strict'
|
||||
function Lisp (lib = {}) {
|
||||
|
||||
Reference in New Issue
Block a user