diff --git a/web/src/main.ts b/web/src/main.ts index c8df47d..bbaee51 100644 --- a/web/src/main.ts +++ b/web/src/main.ts @@ -57,8 +57,6 @@ const sheets = { if ("serviceWorker" in navigator && import.meta.env.PROD) { navigator.serviceWorker.register("/sw.js", { scope: "/" }).catch((err) => console.warn("no service worker:", err)); } -paintGrain(); - const cards: Card[] = []; let active = -1; let loading = false; @@ -1174,24 +1172,6 @@ function signedIn(user: User, pl8list?: Pl8Status): void { if (!cards.length) openLinkOrFeed(); } -/// The tile of film grain the stylesheet lays over everything: faint specks, each -/// a little lighter or darker than what is under it. -function paintGrain(): void { - const size = 128; - const c = document.createElement("canvas"); - c.width = c.height = size; - const ctx = c.getContext("2d"); - if (!ctx) return; - const img = ctx.createImageData(size, size); - for (let i = 0; i < img.data.length; i += 4) { - const v = Math.random() < 0.5 ? 0 : 255; - img.data[i] = img.data[i + 1] = img.data[i + 2] = v; - img.data[i + 3] = Math.random() * 26; - } - ctx.putImageData(img, 0, 0); - document.documentElement.style.setProperty("--grain", `url(${c.toDataURL()})`); -} - /// `/?t=handle/slug` opens on that track; the feed carries on after it. async function openLinkOrFeed(): Promise { const link = new URLSearchParams(location.search).get("t")?.split("/"); diff --git a/web/src/style.css b/web/src/style.css index 687d22b..100d21e 100644 --- a/web/src/style.css +++ b/web/src/style.css @@ -35,17 +35,6 @@ html, body { overflow: hidden; -webkit-tap-highlight-color: transparent; } -/* Film grain over everything, from a tile main.ts paints: a printed flyer. Static - and without a blend mode, so it costs nothing per frame. */ -body::after { - content: ""; - position: fixed; - inset: 0; - z-index: 100; - pointer-events: none; - background: var(--grain, none); -} - a { color: inherit; } button, input {