]> git.sesse.net Git - remoteglot/blobdiff - www/js/remoteglot.js
Send the first JSON inline.
[remoteglot] / www / js / remoteglot.js
index ae522e26113c9869d61ef81d47bce9d4f046c4d7..e14fffa2b81394d6c63645182414e7ca1a142119 100644 (file)
@@ -2482,6 +2482,11 @@ function init() {
        document.getElementById("board").addEventListener('mousedown', mousedownSquare);
        document.getElementById("board").addEventListener('mouseup', mouseupSquare);
 
+       if (window['inline_json']) {
+               let j = window['inline_json'];
+               process_update_response(j['data'], { 'get': (h) => j['headers'][h] });
+               delete window['inline_json'];
+       }
        request_update();
        window.addEventListener('resize', function() {
                board.resize();