Przeglądaj źródła

support listing availlable scripts in pixl.

Lucas Stadler 12 lat temu
rodzic
commit
92d252e65c
1 zmienionych plików z 14 dodań i 0 usunięć
  1. 14 0
      js/pixl/public/index.html

+ 14 - 0
js/pixl/public/index.html

255
            }
255
            }
256
            xhr.send();
256
            xhr.send();
257
        };
257
        };
258
259
        pixl.scripts.list = function() {
260
            var xhr = new XMLHttpRequest();
261
            xhr.open('GET', '/scripts');
262
            xhr.onreadystatechange = function() {
263
                if (xhr.readyState == 4) {
264
                    var scripts = xhr.responseText.split("\n");
265
                    for (var i = 0; i < scripts.length; i++) {
266
                        console.log(scripts[i]);
267
                    }
268
                }
269
            };
270
            xhr.send();
271
        }
258
    </script>
272
    </script>
259
</body>
273
</body>
260
</html>
274
</html>