1
0
mirror of https://github.com/4yn/slidershim.git synced 2024-11-12 00:40:49 +01:00

Merge pull request #13 from kokarare1212/main

WebSocket SSL Support
This commit is contained in:
si yuan 2023-10-05 20:26:07 +08:00 committed by GitHub
commit b77f5f105f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -223,7 +223,7 @@ var ws = null;
var wsTimeout = 0;
var wsConnected = false;
const wsConnect = () => {
ws = new WebSocket("ws://" + location.host + "/ws");
ws = new WebSocket((location.protocol == "https:" ? "wss://" : "ws://") + location.host + "/ws");
ws.binaryType = "arraybuffer";
ws.onopen = () => {
ws.send("alive?");