Use the shorthand when I have it.
This commit is contained in:
parent
a63e9a3258
commit
c099f7950e
6
ux.js
6
ux.js
@ -3,13 +3,13 @@
|
||||
f.insertAdjacentHTML(
|
||||
'afterbegin',
|
||||
'<p><a href="#help" title="Help" accesskey="?">?</a></p>')
|
||||
document.querySelector('[href="#help"]').onclick = e => {
|
||||
if (document.getElementById('help') == null) {
|
||||
d.querySelector('[href="#help"]').onclick = e => {
|
||||
if (d.getElementById('help') == null) {
|
||||
f.insertAdjacentHTML(
|
||||
'beforebegin',
|
||||
'<div id="help"><h2>Key bindings</h2>' +
|
||||
[].map.call(
|
||||
document.querySelectorAll('[accesskey]'),
|
||||
d.querySelectorAll('[accesskey]'),
|
||||
e => e.accessKeyLabel + ": " + (e.title || e.innerText)).join('<br/>') +
|
||||
'</div>');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user