summaryrefslogtreecommitdiff
path: root/web/share
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-07-17 04:17:22 +0300
committerDevaev Maxim <[email protected]>2019-07-17 04:17:22 +0300
commitad83678eb3f735806f87ad9a43c32bdd6ffb92aa (patch)
treef9380c43c42e0d8c8d92e8714ecf81cf17523e49 /web/share
parent9737b926b87529698d1863025efd12e9881af744 (diff)
use strict
Diffstat (limited to 'web/share')
-rw-r--r--web/share/js/bb.js3
-rw-r--r--web/share/js/index/main.js5
-rw-r--r--web/share/js/ipmi/main.js5
-rw-r--r--web/share/js/keypad.js3
-rw-r--r--web/share/js/kvm/atx.js3
-rw-r--r--web/share/js/kvm/hid.js45
-rw-r--r--web/share/js/kvm/main.js3
-rw-r--r--web/share/js/kvm/mouse.js3
-rw-r--r--web/share/js/kvm/msd.js3
-rw-r--r--web/share/js/kvm/session.js7
-rw-r--r--web/share/js/kvm/stream.js3
-rw-r--r--web/share/js/login/main.js3
-rw-r--r--web/share/js/tools.js3
-rw-r--r--web/share/js/wm.js3
14 files changed, 67 insertions, 25 deletions
diff --git a/web/share/js/bb.js b/web/share/js/bb.js
index 858517f2..3b41f95b 100644
--- a/web/share/js/bb.js
+++ b/web/share/js/bb.js
@@ -20,6 +20,9 @@
*****************************************************************************/
+"use strict";
+
+
export function checkBrowser() {
if (
!window.navigator
diff --git a/web/share/js/index/main.js b/web/share/js/index/main.js
index fb4bdc71..ba33b0aa 100644
--- a/web/share/js/index/main.js
+++ b/web/share/js/index/main.js
@@ -20,6 +20,9 @@
*****************************************************************************/
+"use strict";
+
+
import {tools, $} from "../tools.js";
import {checkBrowser} from "../bb.js";
import {wm, initWindowManager} from "../wm.js";
@@ -78,7 +81,7 @@ function __loadKvmdInfo() {
if (info.meta && info.meta.server && info.meta.server.host) {
$("kvmd-meta-server-host").innerHTML = info.meta.server.host;
- document.title = "Pi-KVM Index: " + info.meta.server.host;
+ document.title = `Pi-KVM Index: ${info.meta.server.host}`;
} else {
$("kvmd-meta-server-host").innerHTML = "";
document.title = "Pi-KVM Index";
diff --git a/web/share/js/ipmi/main.js b/web/share/js/ipmi/main.js
index 7aa8b0cb..ff3032f5 100644
--- a/web/share/js/ipmi/main.js
+++ b/web/share/js/ipmi/main.js
@@ -20,12 +20,15 @@
*****************************************************************************/
+"use strict";
+
+
import {$} from "../tools.js";
export function main() {
let host = window.location.hostname;
- let site = window.location.protocol + "//" + window.location.host;
+ let site = `${window.location.protocol}//${window.location.host}`;
$("ipmi-text").innerHTML = `
<span class="code-comment"># Power on the server if it's off:<br>
$</span> ipmitool -I lanplus -U admin -P admin -H ${host} power on<br>
diff --git a/web/share/js/keypad.js b/web/share/js/keypad.js
index 58bcef86..7e4cf366 100644
--- a/web/share/js/keypad.js
+++ b/web/share/js/keypad.js
@@ -20,6 +20,9 @@
*****************************************************************************/
+"use strict";
+
+
import {tools, $$$} from "./tools.js";
diff --git a/web/share/js/kvm/atx.js b/web/share/js/kvm/atx.js
index e95998f1..d65d1ded 100644
--- a/web/share/js/kvm/atx.js
+++ b/web/share/js/kvm/atx.js
@@ -20,6 +20,9 @@
*****************************************************************************/
+"use strict";
+
+
import {tools, $} from "../tools.js";
import {wm} from "../wm.js";
diff --git a/web/share/js/kvm/hid.js b/web/share/js/kvm/hid.js
index 0e0adbea..6fd5f6a0 100644
--- a/web/share/js/kvm/hid.js
+++ b/web/share/js/kvm/hid.js
@@ -20,6 +20,9 @@
*****************************************************************************/
+"use strict";
+
+
import {tools, $, $$$} from "../tools.js";
import {wm} from "../wm.js";
@@ -132,27 +135,27 @@ export function Hid() {
"\n": ["Enter"],
"\t": ["Tab"],
" ": ["Space"],
- "`": ["Backquote"], "~": ["ShiftLeft", "Backquote"],
- "\\": ["Backslash"], "|": ["ShiftLeft", "Backslash"],
- "[": ["BracketLeft"], "{": ["ShiftLeft", "BracketLeft"],
- "]": ["BracketLeft"], "}": ["ShiftLeft", "BracketRight"],
- ",": ["Comma"], "<": ["ShiftLeft", "Comma"],
- ".": ["Period"], ">": ["ShiftLeft", "Period"],
- "1": ["Digit1"], "!": ["ShiftLeft", "Digit1"],
- "2": ["Digit2"], "@": ["ShiftLeft", "Digit2"],
- "3": ["Digit3"], "#": ["ShiftLeft", "Digit3"],
- "4": ["Digit4"], "$": ["ShiftLeft", "Digit4"],
- "5": ["Digit5"], "%": ["ShiftLeft", "Digit5"],
- "6": ["Digit6"], "^": ["ShiftLeft", "Digit6"],
- "7": ["Digit7"], "&": ["ShiftLeft", "Digit7"],
- "8": ["Digit8"], "*": ["ShiftLeft", "Digit8"],
- "9": ["Digit9"], "(": ["ShiftLeft", "Digit9"],
- "0": ["Digit0"], ")": ["ShiftLeft", "Digit0"],
- "-": ["Minus"], "_": ["ShiftLeft", "Minus"],
- "'": ["Quote"], "\"": ["ShiftLeft", "Quote"],
- ";": ["Semicolon"], ":": ["ShiftLeft", "Semicolon"],
- "/": ["Slash"], "?": ["ShiftLeft", "Slash"],
- "=": ["Equal"], "+": ["ShiftLeft", "Equal"],
+ "`": ["Backquote"], "~": ["ShiftLeft", "Backquote"],
+ "\\": ["Backslash"], "|": ["ShiftLeft", "Backslash"],
+ "[": ["BracketLeft"], "{": ["ShiftLeft", "BracketLeft"],
+ "]": ["BracketLeft"], "}": ["ShiftLeft", "BracketRight"],
+ ",": ["Comma"], "<": ["ShiftLeft", "Comma"],
+ ".": ["Period"], ">": ["ShiftLeft", "Period"],
+ "1": ["Digit1"], "!": ["ShiftLeft", "Digit1"],
+ "2": ["Digit2"], "@": ["ShiftLeft", "Digit2"],
+ "3": ["Digit3"], "#": ["ShiftLeft", "Digit3"],
+ "4": ["Digit4"], "$": ["ShiftLeft", "Digit4"],
+ "5": ["Digit5"], "%": ["ShiftLeft", "Digit5"],
+ "6": ["Digit6"], "^": ["ShiftLeft", "Digit6"],
+ "7": ["Digit7"], "&": ["ShiftLeft", "Digit7"],
+ "8": ["Digit8"], "*": ["ShiftLeft", "Digit8"],
+ "9": ["Digit9"], "(": ["ShiftLeft", "Digit9"],
+ "0": ["Digit0"], ")": ["ShiftLeft", "Digit0"],
+ "-": ["Minus"], "_": ["ShiftLeft", "Minus"],
+ "'": ["Quote"], "\"": ["ShiftLeft", "Quote"],
+ ";": ["Semicolon"], ":": ["ShiftLeft", "Semicolon"],
+ "/": ["Slash"], "?": ["ShiftLeft", "Slash"],
+ "=": ["Equal"], "+": ["ShiftLeft", "Equal"],
};
for (let ch = "a".charCodeAt(0); ch <= "z".charCodeAt(0); ++ch) {
diff --git a/web/share/js/kvm/main.js b/web/share/js/kvm/main.js
index 3059457b..2c88eff8 100644
--- a/web/share/js/kvm/main.js
+++ b/web/share/js/kvm/main.js
@@ -20,6 +20,9 @@
*****************************************************************************/
+"use strict";
+
+
import {tools, $} from "../tools.js";
import {checkBrowser} from "../bb.js";
import {wm, initWindowManager} from "../wm.js";
diff --git a/web/share/js/kvm/mouse.js b/web/share/js/kvm/mouse.js
index 6a2f9bba..c462ffa6 100644
--- a/web/share/js/kvm/mouse.js
+++ b/web/share/js/kvm/mouse.js
@@ -20,6 +20,9 @@
*****************************************************************************/
+"use strict";
+
+
import {tools, $} from "../tools.js";
import {Keypad} from "../keypad.js";
diff --git a/web/share/js/kvm/msd.js b/web/share/js/kvm/msd.js
index 3b414376..6fb5eee6 100644
--- a/web/share/js/kvm/msd.js
+++ b/web/share/js/kvm/msd.js
@@ -20,6 +20,9 @@
*****************************************************************************/
+"use strict";
+
+
import {tools, $} from "../tools.js";
import {wm} from "../wm.js";
diff --git a/web/share/js/kvm/session.js b/web/share/js/kvm/session.js
index d76e75ae..5b7d9dda 100644
--- a/web/share/js/kvm/session.js
+++ b/web/share/js/kvm/session.js
@@ -20,6 +20,9 @@
*****************************************************************************/
+"use strict";
+
+
import {tools, $} from "../tools.js";
import {wm} from "../wm.js";
@@ -62,8 +65,8 @@ export function Session() {
${text}
`;
if (state.meta.server && state.meta.server.host) {
- $("kvmd-meta-server-host").innerHTML = "Server: " + state.meta.server.host;
- document.title = "Pi-KVM Session: " + state.meta.server.host;
+ $("kvmd-meta-server-host").innerHTML = `Server: ${state.meta.server.host}`;
+ document.title = `Pi-KVM Session: ${state.meta.server.host}`;
} else {
$("kvmd-meta-server-host").innerHTML = "";
document.title = "Pi-KVM Session";
diff --git a/web/share/js/kvm/stream.js b/web/share/js/kvm/stream.js
index 8a664454..0e1643be 100644
--- a/web/share/js/kvm/stream.js
+++ b/web/share/js/kvm/stream.js
@@ -20,6 +20,9 @@
*****************************************************************************/
+"use strict";
+
+
import {tools, $} from "../tools.js";
import {wm} from "../wm.js";
diff --git a/web/share/js/login/main.js b/web/share/js/login/main.js
index 3de2bf41..fff15caf 100644
--- a/web/share/js/login/main.js
+++ b/web/share/js/login/main.js
@@ -20,6 +20,9 @@
*****************************************************************************/
+"use strict";
+
+
import {tools, $} from "../tools.js";
import {checkBrowser} from "../bb.js";
import {wm, initWindowManager} from "../wm.js";
diff --git a/web/share/js/tools.js b/web/share/js/tools.js
index 0498927c..a0f0907e 100644
--- a/web/share/js/tools.js
+++ b/web/share/js/tools.js
@@ -20,6 +20,9 @@
*****************************************************************************/
+"use strict";
+
+
export var tools = new function() {
let __debug = (new URL(window.location.href)).searchParams.get("debug");
diff --git a/web/share/js/wm.js b/web/share/js/wm.js
index 586bceca..697f4755 100644
--- a/web/share/js/wm.js
+++ b/web/share/js/wm.js
@@ -20,6 +20,9 @@
*****************************************************************************/
+"use strict";
+
+
import {tools, $, $$, $$$} from "./tools.js";