Pepguy commited on
Commit
7c9ff5c
·
verified ·
1 Parent(s): 072db80

Update app.js

Browse files
Files changed (1) hide show
  1. app.js +2 -2
app.js CHANGED
@@ -41,13 +41,13 @@ Bun.serve({
41
  return new Response(`<!doctype html>
42
  <html><head><title>Dubem Realtime Rooms</title><meta charset="utf-8"/></head><body>
43
  <h2>Join a Room & Send Messages</h2>
44
- <label><input type="checkbox" id="authToggle"> Send Auth Token?</label><br/>
45
  <input id="room" placeholder="Room ID"/><button onclick="joinRoom()">Join Room</button>
46
  <div id="log"></div>
47
  <input id="msg" placeholder="Type a message" style="width:80%;"/><button onclick="sendMsg()">Send</button>
48
  <script>
49
  const VALID_TOKEN = "mysecrettoken"; // must match backend
50
- let includeAuth = false;
51
  document.getElementById("authToggle").addEventListener("change", e => {
52
  includeAuth = e.target.checked;
53
  connect(); // reconnect on toggle
 
41
  return new Response(`<!doctype html>
42
  <html><head><title>Dubem Realtime Rooms</title><meta charset="utf-8"/></head><body>
43
  <h2>Join a Room & Send Messages</h2>
44
+ <label><input type="checkbox" id="authToggle" checked> Send Auth Token?</label><br/>
45
  <input id="room" placeholder="Room ID"/><button onclick="joinRoom()">Join Room</button>
46
  <div id="log"></div>
47
  <input id="msg" placeholder="Type a message" style="width:80%;"/><button onclick="sendMsg()">Send</button>
48
  <script>
49
  const VALID_TOKEN = "mysecrettoken"; // must match backend
50
+ let includeAuth = true; //false;
51
  document.getElementById("authToggle").addEventListener("change", e => {
52
  includeAuth = e.target.checked;
53
  connect(); // reconnect on toggle