gosora/public/register.js

14 lines
296 B
JavaScript
Raw Normal View History

(() => {
addInitHook("end_init", () => {
fetch("/api/watches/")
.then(response => {
if(response.status!==200) {
console.log("error");
console.log("response:", response);
return;
}
response.text().then(data => eval(data));
})
.catch(err => console.log("err:", err));
});
})();