1
0
mirror of synced 2024-11-23 22:30:56 +01:00

Update neopixel.js

This commit is contained in:
mishe-w 2023-07-29 03:37:42 +09:00 committed by Will
parent 60e7eb9618
commit a1fe2e5f37

View File

@ -311,7 +311,12 @@ function bin_to_json(bin) {
let socket = undefined;
function new_websocket() {
if (location.hostname == "") {
socket = new WebSocket("ws://localhost:9002");
} else {
socket = new WebSocket(`ws://${location.hostname}:9002`);
}
socket.binaryType = "arraybuffer";
socket.onopen = function(e) {