()
| 597 | } |
| 598 | |
| 599 | async function isAuthedNow() { |
| 600 | try { |
| 601 | const r = await fetch('/api/auth/checkAuth.php', { credentials: 'include' }); |
| 602 | const j = await r.json().catch(() => ({})); |
| 603 | return !!j.authenticated; |
| 604 | } catch (e) { return false; } |
| 605 | } |
| 606 | |
| 607 | function rafTick(times = 2) { |
| 608 | return new Promise(res => { |