Created
September 25, 2022 12:25
-
-
Save percybolmer/15b5203aa3c3a585ec88bf9cf5c0d111 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function connectWebsocket(otp) { | |
// Check if the browser supports WebSocket | |
if (window["WebSocket"]) { | |
console.log("supports websockets"); | |
// Connect to websocket using OTP as a GET parameter | |
conn = new WebSocket("wss://" + document.location.host + "/ws?otp="+ otp); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment