summaryrefslogtreecommitdiff
path: root/kvmd/web/js/ui.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/ui.js
parent3551ebd9a17cf150d95555ba3ff234910e28a427 (diff)
$$ as document.getElementsByClassName()
Diffstat (limited to 'kvmd/web/js/ui.js')
-rw-r--r--kvmd/web/js/ui.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/web/js/ui.js b/kvmd/web/js/ui.js
index d38b36fb..b4ad9290 100644
--- a/kvmd/web/js/ui.js
+++ b/kvmd/web/js/ui.js
@@ -4,12 +4,12 @@ var ui = new function() {
var __ctl_items = [];
this.init = function() {
- Array.prototype.forEach.call(document.getElementsByClassName("ctl-item"), function(el_item) {
+ Array.prototype.forEach.call($$("ctl-item"), function(el_item) {
el_item.onclick = () => __toggleMenu(el_item);
__ctl_items.push(el_item);
});
- Array.prototype.forEach.call(document.getElementsByClassName("window"), function(el_window) {
+ Array.prototype.forEach.call($$("window"), function(el_window) {
var el_grab = el_window.querySelector(".window-header .window-grab");
__makeWindowMovable(el_grab, el_window);