xyplon commited on
Commit
f087654
·
verified ·
1 Parent(s): 954baba

Update static/models.js

Browse files
Files changed (1) hide show
  1. static/models.js +6 -5
static/models.js CHANGED
@@ -224,8 +224,9 @@ btn.onclick = async () => {
224
 
225
  }
226
 
227
- const socket = io('https://xyplon.onrender.com');
228
-
229
- socket.on('update', function(data) {
230
- document.getElementById('stats').textContent = `Pending (Generating): ${data["Pending Requests"]} Total Requests: ${data["Total Requests"]}`;
231
- });
 
 
224
 
225
  }
226
 
227
+ window.addEventListener('load', function() {
228
+ const socket = io('https://xyplon.onrender.com');
229
+ socket.on('update', function(data) {
230
+ document.getElementById('stats').textContent = `Pending (Generating): ${data["Pending Requests"]} Total Requests: ${data["Total Requests"]}`;
231
+ });
232
+ });