()
| 272 | |
| 273 | // Also initialize for updateLog command |
| 274 | function updateLog() { |
| 275 | console.log("updateLog called"); |
| 276 | |
| 277 | if (!globalWS || globalWS.readyState !== WebSocket.OPEN) { |
| 278 | console.log("updateLog: WebSocket not ready, attempting connection"); |
| 279 | // Only try to connect if no connection exists |
| 280 | if (!globalWS) { |
| 281 | initWebSocket(); |
| 282 | } |
| 283 | setTimeout(updateLog, 100); |
| 284 | return; |
| 285 | } |
| 286 | |
| 287 | |
| 288 | var data = { cmd: "updateLog" }; |
| 289 | globalWS.send(JSON.stringify(data)); |
| 290 | } |
| 291 | |
| 292 | function getCookie(name) { |
| 293 | var value = "; " + document.cookie; |
no test coverage detected