refactor: more css purging

This commit is contained in:
2024-03-04 12:44:17 +00:00
parent ae37f361ce
commit 6dd9730ca6
60 changed files with 728 additions and 1120 deletions

17
src/time-sync.ts Normal file
View File

@ -0,0 +1,17 @@
import { unixNowMs } from "@snort/shared";
export let TimeSync = 0;
export async function syncClock() {
try {
const req = await fetch("https://api.zap.stream/api/time", {
signal: AbortSignal.timeout(1000),
});
const nowAtServer = (await req.json()).time as number;
const now = unixNowMs();
TimeSync = now - nowAtServer;
console.debug("Time clock sync", TimeSync);
} catch {
// ignore
}
}