2019-04-25 06:02:51 +00:00
|
|
|
(() => {
|
|
|
|
addInitHook("end_init", () => {
|
|
|
|
fetch("/api/watches/")
|
2020-02-18 23:04:14 +00:00
|
|
|
.then(resp => {
|
|
|
|
if(resp.status!==200) {
|
2019-04-25 06:02:51 +00:00
|
|
|
console.log("error");
|
2020-02-18 23:04:14 +00:00
|
|
|
console.log("response:", resp);
|
2019-04-25 06:02:51 +00:00
|
|
|
return;
|
|
|
|
}
|
2020-02-18 23:04:14 +00:00
|
|
|
resp.text().then(data => eval(data));
|
2019-04-25 06:02:51 +00:00
|
|
|
})
|
|
|
|
.catch(err => console.log("err:", err));
|
|
|
|
});
|
|
|
|
})();
|