ternary accessKeyModifiers
This commit is contained in:
parent
2429845dd6
commit
7245e0f073
@ -7,7 +7,6 @@ let columns = Array.from(Array(9), x => [])
|
|||||||
let regions = Array.from(Array(9), x => [])
|
let regions = Array.from(Array(9), x => [])
|
||||||
let valueToInsert = ""
|
let valueToInsert = ""
|
||||||
let history = []
|
let history = []
|
||||||
let accessKeyModifiers = "AccessKey+"
|
|
||||||
let easyBoxes = []
|
let easyBoxes = []
|
||||||
let insertRadios = []
|
let insertRadios = []
|
||||||
|
|
||||||
@ -70,8 +69,9 @@ window.onload = function() {
|
|||||||
label.control.label = label
|
label.control.label = label
|
||||||
}
|
}
|
||||||
|
|
||||||
if (/Win/.test(navigator.userAgent) || /Linux/.test(navigator.userAgent)) accessKeyModifiers = "Alt+Maj+"
|
let accessKeyModifiers = (/Win/.test(navigator.userAgent) || /Linux/.test(navigator.userAgent)) ? "Alt+Maj+"
|
||||||
else if (/Mac/.test(navigator.userAgent)) accessKeyModifiers = "⌃⌥"
|
: (/Mac/.test(navigator.userAgent)) ? "⌃⌥"
|
||||||
|
: "AccessKey+"
|
||||||
for (node of document.querySelectorAll("*[accesskey]")) {
|
for (node of document.querySelectorAll("*[accesskey]")) {
|
||||||
shortcut = ` [${node.accessKeyLabel||(accessKeyModifiers+node.accessKey)}]`
|
shortcut = ` [${node.accessKeyLabel||(accessKeyModifiers+node.accessKey)}]`
|
||||||
if (node.title) node.title += shortcut
|
if (node.title) node.title += shortcut
|
||||||
|
Loading…
x
Reference in New Issue
Block a user