diff --git a/Caddyfile b/Caddyfile index f70e5a5..706186f 100644 --- a/Caddyfile +++ b/Caddyfile @@ -54,7 +54,7 @@ # The crawl pass pages get no CSP: their Buy button posts to /crawl/checkout, # which redirects to coinpayportal.com, and form-action 'self' would block it. @notcrawl not path /crawl /crawl/* - header @notcrawl Content-Security-Policy "default-src 'self'; script-src 'self' https://crawlproof.com https://cdn.jsdelivr.net; connect-src 'self' https://crawlproof.com https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline'; img-src 'self' data: https://built.indie.pit.world https://pwamart.com; font-src 'self'; frame-src 'self' https://crawlproof.com; base-uri 'self'; form-action 'self' https://pit.world; frame-ancestors 'none'" + header @notcrawl Content-Security-Policy "default-src 'self'; script-src 'self' https://crawlproof.com https://cdn.jsdelivr.net; connect-src 'self' https://crawlproof.com https://cdn.jsdelivr.net https://pit.world; style-src 'self' 'unsafe-inline'; img-src 'self' data: https://built.indie.pit.world https://pwamart.com https://logicsrc.com https://profullstack.com; font-src 'self'; frame-src 'self' https://crawlproof.com; base-uri 'self'; form-action 'self' https://pit.world; frame-ancestors 'none'" # Correct content types for machine-readable files. @plain path /robots.txt /llms.txt /llms-full.txt /.well-known/security.txt diff --git a/Dockerfile b/Dockerfile index 3e49dc8..b8cd217 100644 --- a/Dockerfile +++ b/Dockerfile @@ -92,7 +92,6 @@ RUN for f in /api/migrations-pg/*.sql; do \ head -1 "$f" | grep -q '^-- TronBrowser Postgres schema:' \ || { echo "not a Postgres migration: $f" >&2; exit 1; }; \ done -COPY scripts/pit-footer.mjs /pit-footer.mjs COPY start.sh /start.sh RUN chmod +x /start.sh CMD ["/start.sh"] diff --git a/apps/extensions/public/extension.html b/apps/extensions/public/extension.html index 084e534..65ab344 100644 --- a/apps/extensions/public/extension.html +++ b/apps/extensions/public/extension.html @@ -27,11 +27,61 @@

Loading…

- +
+ - + diff --git a/apps/extensions/public/index.html b/apps/extensions/public/index.html index d364259..0a13679 100644 --- a/apps/extensions/public/index.html +++ b/apps/extensions/public/index.html @@ -36,11 +36,62 @@

Browser extensions, without the gatekeepers.

- +
+ + - + diff --git a/apps/extensions/public/install-guide.html b/apps/extensions/public/install-guide.html index 62b6f77..aa5125c 100644 --- a/apps/extensions/public/install-guide.html +++ b/apps/extensions/public/install-guide.html @@ -83,11 +83,61 @@

Publishing via a PR (alternative to the upload form)

- +
+ - + diff --git a/apps/extensions/public/store.css b/apps/extensions/public/store.css index 65b84f2..dfcad6a 100644 --- a/apps/extensions/public/store.css +++ b/apps/extensions/public/store.css @@ -147,7 +147,6 @@ pre { background: #070b12; border: 1px solid var(--border); border-radius: 10px; .tabpane { display: none; } .tabpane.active { display: block; } -footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; padding: 26px 0; margin-top: 40px; } .muted { color: var(--muted); } .center { text-align: center; } .hidden { display: none !important; } @@ -171,8 +170,6 @@ footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 13 .acctbar { order: 1; margin-left: auto; } .nav .spacer { order: 2; flex-basis: 100%; height: 0; } .nav a.navlink { order: 3; font-size: 14px; } - /* Footer link list: give it room so it wraps between links, not mid-phrase. */ - footer .wrap { line-height: 2; } } /* ── modals (replacing alert/confirm/prompt) ── */ diff --git a/apps/extensions/public/submit.html b/apps/extensions/public/submit.html index 684b3d3..5ae8656 100644 --- a/apps/extensions/public/submit.html +++ b/apps/extensions/public/submit.html @@ -72,11 +72,61 @@

5 · Pay the $1 listing fee

- +
+ - + diff --git a/apps/web/public/404.html b/apps/web/public/404.html index 875cc8e..e89c591 100644 --- a/apps/web/public/404.html +++ b/apps/web/public/404.html @@ -18,6 +18,58 @@

404

That page isn't here. Try the homepage.

- +
+ diff --git a/apps/web/public/dns.html b/apps/web/public/dns.html index 171a57c..e1e9213 100644 --- a/apps/web/public/dns.html +++ b/apps/web/public/dns.html @@ -82,6 +82,58 @@

How to apply

- +
+ diff --git a/apps/web/public/ext-callback.html b/apps/web/public/ext-callback.html index e8382e8..6539c70 100644 --- a/apps/web/public/ext-callback.html +++ b/apps/web/public/ext-callback.html @@ -23,5 +23,57 @@

Connecting your account…

surface — the token never reaches the server (it's in the fragment). If you landed here outside TronBrowser, nothing happens. --> - +
+ diff --git a/apps/web/public/index.html b/apps/web/public/index.html index a4c38b2..16c5e61 100644 --- a/apps/web/public/index.html +++ b/apps/web/public/index.html @@ -250,18 +250,64 @@

How do I install it?

-
- -
-
-
- -
- +
+ + - + diff --git a/apps/web/public/login.html b/apps/web/public/login.html index c6fff4f..fc7d794 100644 --- a/apps/web/public/login.html +++ b/apps/web/public/login.html @@ -52,5 +52,57 @@ - +
+ diff --git a/apps/web/public/privacy.html b/apps/web/public/privacy.html index edc9db4..75b5bf6 100644 --- a/apps/web/public/privacy.html +++ b/apps/web/public/privacy.html @@ -46,6 +46,58 @@

Contact

TronBrowser is published by Profullstack, Inc.

TronBrowser is free and open source under the MIT License.

- +
+ diff --git a/apps/web/public/push.html b/apps/web/public/push.html index 9eac061..ef86382 100644 --- a/apps/web/public/push.html +++ b/apps/web/public/push.html @@ -68,6 +68,58 @@

The protocol, for a self-hosted service

Browser calls carry Authorization: Bearer <device secret>. The source is in services/api/src/push.

- +
+ diff --git a/apps/web/public/settings.html b/apps/web/public/settings.html index 5e3837d..e6eb0d3 100644 --- a/apps/web/public/settings.html +++ b/apps/web/public/settings.html @@ -141,5 +141,57 @@

Import / export OP - +
+ diff --git a/scripts/pit-footer.mjs b/scripts/pit-footer.mjs deleted file mode 100644 index 1d9fecb..0000000 --- a/scripts/pit-footer.mjs +++ /dev/null @@ -1,51 +0,0 @@ -// The pit.world global footer for the static site Caddy serves from /srv. -// Runs beside Caddy (start.sh): fetches the snippet server-side at boot and then -// hourly, and writes it between the markers each page carries -// just before . Any failure keeps the last good copy (or nothing), so a -// pit.world outage never breaks a page. Writes are temp-file + rename (atomic). -import { readdir, readFile, rename, writeFile } from "node:fs/promises"; -import { join } from "node:path"; - -const URL = "https://pit.world/snippets/footer.html?site=tronbrowser.dev"; -const ROOT = process.env.PIT_FOOTER_ROOT || "/srv"; -const EVERY_MS = 60 * 60 * 1000; -const MARKERS = /[\s\S]*?/; - -async function htmlFiles(dir) { - const out = []; - for (const entry of await readdir(dir, { withFileTypes: true })) { - const path = join(dir, entry.name); - if (entry.isDirectory()) out.push(...(await htmlFiles(path))); - else if (entry.name.endsWith(".html")) out.push(path); - } - return out; -} - -async function refresh() { - let snippet; - try { - const res = await fetch(URL, { signal: AbortSignal.timeout(3000) }); - if (!res.ok) throw new Error(`HTTP ${res.status}`); - snippet = (await res.text()).trim(); - if (!snippet.includes("data-pit-footer")) throw new Error("no data-pit-footer"); - } catch (err) { - console.error(`[pit-footer] fetch failed, keeping last copy: ${err.message}`); - return; - } - const block = `${snippet}`; - for (const file of await htmlFiles(ROOT)) { - try { - const html = await readFile(file, "utf8"); - if (!MARKERS.test(html)) continue; - const next = html.replace(MARKERS, () => block); - if (next === html) continue; - await writeFile(`${file}.pit-tmp`, next); - await rename(`${file}.pit-tmp`, file); - } catch (err) { - console.error(`[pit-footer] ${file}: ${err.message}`); - } - } -} - -await refresh(); -if (!process.argv.includes("--once")) setInterval(refresh, EVERY_MS); diff --git a/start.sh b/start.sh index 76bf3a1..4648d1a 100644 --- a/start.sh +++ b/start.sh @@ -6,10 +6,6 @@ set -e # a transient DB hiccup shouldn't block the whole service from starting. MIGRATIONS_DIR=/api/migrations-pg bun /api/db-migrate.mjs || echo "[migrate] FAILED — continuing" PORT=8090 bun /api/dist/index.js & -# pit.world global footer: fetched server-side at boot and hourly, written into -# each page's slot. Never blocks or breaks serving. -bun /pit-footer.mjs & - # --- Tor v3 hidden service --------------------------------------------------- # Expose the site over a stable .onion. Tor forwards onion:80 -> Caddy on $PORT # (the same process that serves clearnet), so no extra web server is needed.