gosora/public/register.js

14 lines
233 B
JavaScript

(() => {
addInitHook("end_init", () => {
fetch("/api/watches/")
.then(resp => {
if(resp.status!==200) {
log("err");
log("resp",resp);
return;
}
resp.text().then(d => eval(d));
})
.catch(e => log("e",e));
});
})()