summaryrefslogtreecommitdiff
path: root/kvmd/web/js/keyboard.js
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2018-08-08 08:39:26 +0300
committerDevaev Maxim <[email protected]>2018-08-08 08:39:26 +0300
commitaf9100593b6281969b0114d05e6a105d533246a1 (patch)
tree76db5c59b6462631f3aad52b6a0505dcfca9dd76 /kvmd/web/js/keyboard.js
parent3551ebd9a17cf150d95555ba3ff234910e28a427 (diff)
$$ as document.getElementsByClassName()
Diffstat (limited to 'kvmd/web/js/keyboard.js')
-rw-r--r--kvmd/web/js/keyboard.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/web/js/keyboard.js b/kvmd/web/js/keyboard.js
index 67553159..15cab179 100644
--- a/kvmd/web/js/keyboard.js
+++ b/kvmd/web/js/keyboard.js
@@ -17,7 +17,7 @@ var keyboard = new function() {
$("stream-window").onkeydown = (event) => __keyboardHandler(event, true);
$("stream-window").onkeyup = (event) => __keyboardHandler(event, false);
- Array.prototype.forEach.call(document.getElementsByClassName("key"), function(el_key) {
+ Array.prototype.forEach.call($$("key"), function(el_key) {
el_key.onmousedown = () => __clickHandler(el_key, true);
el_key.onmouseup = () => __clickHandler(el_key, false);
el_key.onmouseout = function() {
@@ -27,7 +27,7 @@ var keyboard = new function() {
};
__keys.push(el_key);
});
- Array.prototype.forEach.call(document.getElementsByClassName("modifier"), function(el_key) {
+ Array.prototype.forEach.call($$("modifier"), function(el_key) {
el_key.onmousedown = () => __toggleModifierHandler(el_key);
__modifiers.push(el_key);
});