diff options
Diffstat (limited to 'web/js')
-rw-r--r-- | web/js/hid.js | 4 | ||||
-rw-r--r-- | web/js/keyboard.js | 2 | ||||
-rw-r--r-- | web/js/mouse.js | 6 | ||||
-rw-r--r-- | web/js/session.js | 10 | ||||
-rw-r--r-- | web/js/stream.js | 10 | ||||
-rw-r--r-- | web/js/ui.js | 4 |
6 files changed, 18 insertions, 18 deletions
diff --git a/web/js/hid.js b/web/js/hid.js index 77bb865b..5b13480f 100644 --- a/web/js/hid.js +++ b/web/js/hid.js @@ -66,7 +66,7 @@ function Hid() { var __emitShortcut = function(codes) { return new Promise(function(resolve) { - tools.debug("Emitting keys:", codes); + tools.debug("HID: emitting keys:", codes); var raw_events = []; [[codes, true], [codes.slice().reverse(), false]].forEach(function(op) { @@ -156,7 +156,7 @@ function Hid() { $("hid-pak-led").className = "led-yellow-rotating-fast"; $("hid-pak-led").title = "Autotyping..."; - tools.debug("Paste-as-keys:", text); + tools.debug("HID: paste-as-keys:", text); var index = 0; var iterate = function() { diff --git a/web/js/keyboard.js b/web/js/keyboard.js index 42e92ecd..ee9a7ba1 100644 --- a/web/js/keyboard.js +++ b/web/js/keyboard.js @@ -173,7 +173,7 @@ function Keyboard() { var __sendKey = function(el_key, state) { var code = el_key.getAttribute("data-key"); - tools.debug("Key", (state ? "pressed:" : "released:"), code); + tools.debug("Keyboard: key", (state ? "pressed:" : "released:"), code); if (__ws) { __ws.send(JSON.stringify({ event_type: "key", diff --git a/web/js/mouse.js b/web/js/mouse.js index dd2ff30d..9f93a659 100644 --- a/web/js/mouse.js +++ b/web/js/mouse.js @@ -96,7 +96,7 @@ function Mouse() { var __sendButton = function(button, state) { - tools.debug("Mouse button", (state ? "pressed:" : "released:"), button); + tools.debug("Mouse: button", (state ? "pressed:" : "released:"), button); __sendMove(); if (__ws) { __ws.send(JSON.stringify({ @@ -115,7 +115,7 @@ function Mouse() { x: __translate(pos.x, 0, el_stream_image.clientWidth, -32768, 32767), y: __translate(pos.y, 0, el_stream_image.clientHeight, -32768, 32767), }; - tools.debug("Mouse move:", to); + tools.debug("Mouse: moved:", to); if (__ws) { __ws.send(JSON.stringify({ event_type: "mouse_move", @@ -145,7 +145,7 @@ function Mouse() { } if (delta.y) { - tools.debug("Mouse wheel:", delta); + tools.debug("Mouse: scrolled:", delta); if (__ws) { __ws.send(JSON.stringify({ event_type: "mouse_wheel", diff --git a/web/js/session.js b/web/js/session.js index dcc968c7..97352448 100644 --- a/web/js/session.js +++ b/web/js/session.js @@ -52,7 +52,7 @@ function Session(atx, hid, msd) { var __wsOpenHandler = function(event) { $("link-led").className = "led-green"; $("link-led").title = "Connected"; - tools.debug("WebSocket opened:", event); + tools.debug("Session: socket opened:", event); atx.loadInitialState(); msd.loadInitialState(); hid.setSocket(__ws); @@ -61,7 +61,7 @@ function Session(atx, hid, msd) { }; var __wsMessageHandler = function(event) { - // tools.debug("WebSocket: received data:", event.data); + // tools.debug("Session: received socket data:", event.data); event = JSON.parse(event.data); if (event.msg_type === "pong") { __missed_heartbeats = 0; @@ -75,7 +75,7 @@ function Session(atx, hid, msd) { }; var __wsErrorHandler = function(event) { - tools.error("WebSocket error:", event); + tools.error("Session: socket error:", event); if (__ws) { __ws.onclose = null; __ws.close(); @@ -85,7 +85,7 @@ function Session(atx, hid, msd) { var __wsCloseHandler = function(event) { $("link-led").className = "led-gray"; - tools.debug("WebSocket closed:", event); + tools.debug("Session: socket closed:", event); if (__ping_timer) { clearInterval(__ping_timer); __ping_timer = null; @@ -107,7 +107,7 @@ function Session(atx, hid, msd) { } __ws.send(JSON.stringify({"event_type": "ping"})); } catch (err) { - tools.error("Ping error:", err.message); + tools.error("Session: ping error:", err.message); if (__ws) { __ws.onclose = null; __ws.close(); diff --git a/web/js/stream.js b/web/js/stream.js index 5ea48067..4d45dada 100644 --- a/web/js/stream.js +++ b/web/js/stream.js @@ -51,7 +51,7 @@ function Stream() { var response = (http.status === 200 ? JSON.parse(http.responseText) : null); if (http.status !== 200) { - tools.info("Refreshing stream ..."); + tools.info("Stream: refreshing ..."); $("stream-image").className = "stream-image-inactive"; $("stream-box").classList.add("stream-box-inactive"); $("stream-led").className = "led-gray"; @@ -101,11 +101,11 @@ function Stream() { var path = "/streamer/stream?t=" + new Date().getTime(); if (tools.browser.is_chrome || tools.browser.is_blink) { // uStreamer fix for Blink https://bugs.chromium.org/p/chromium/issues/detail?id=527446 - tools.info("Stream: using advance_headers=1"); + tools.info("Stream: using advance_headers=1 to fix Blink MJPG bugs"); path += "&advance_headers=1"; } else if (tools.browser.is_safari || tools.browser.is_ios) { // uStreamer fix for WebKit - tools.info("Stream: using dual_final_frames=1"); + tools.info("Stream: using dual_final_frames=1 to fix WebKit MJPG bugs"); path += "&dual_final_frames=1"; } $("stream-image").src = path; @@ -118,7 +118,7 @@ function Stream() { $("stream-soft-fps-slider").disabled = false; $("stream-reset-button").disabled = false; __prev_state = true; - tools.info("Stream acquired"); + tools.info("Stream: acquired"); } } } @@ -207,7 +207,7 @@ function Stream() { var view = ui.getViewGeometry(); for (var size = 100; size >= el_slider.min; size -= el_slider.step) { - tools.info("Adjusting size:", size); + tools.info("Stream: adjusting size:", size); $("stream-size-slider").value = size; __resize(true); diff --git a/web/js/ui.js b/web/js/ui.js index 164d46f0..ec16eef8 100644 --- a/web/js/ui.js +++ b/web/js/ui.js @@ -306,12 +306,12 @@ function Ui() { var el_to_focus = (el_window.className === "modal" ? el_window.querySelector(".modal-window") : el_window); if (document.activeElement !== el_to_focus) { el_to_focus.focus(); - tools.debug("Focused window:", el_window); + tools.debug("UI: focused window:", el_window); if (el_window.className !== "modal" && parseInt(el_window.style.zIndex) !== __top_z_index) { var z_index = __top_z_index + 1; el_window.style.zIndex = z_index; __top_z_index = z_index; - tools.debug("Raised window:", el_window); + tools.debug("UI: raised window:", el_window); } } }; |