Skip to content

Sponsor banner in the sidebar for unregistered installations - #23

Merged
githubflyideas merged 2 commits into
mainfrom
sponsor-slot
Oct 17, 2026
Merged

githubflyideas merged 2 commits into
mainfrom
sponsor-slot

Conversation

@githubflyideas

Copy link
Copy Markdown
Owner

Adds a small sponsor banner in the left sidebar, above the language/theme picker, for unregistered installations only. Separate from #22; no version bump, no tag.

Fallback order:

  1. The browser fetches traffic66/sponsors.json and images from raw.githubusercontent.com/githubflyideas/ads-sponsor (3 s timeout, no credentials, no referrer, 30 min sessionStorage cache).
  2. If that fails or no image loads: /api/sponsor, the last good set the server downloaded into <data>/sponsor (at start and every 6 h, skipped while registered; 10 s timeout, UA traffic66/<version>, max 4 slides, images <=150 KB and png/jpg/webp/gif by content, http/https links only; the old set is kept when GitHub is unreachable).
  3. If both fail: a built-in text box ("This slot is for one VPS / IDC / network sponsor — contact route66traffic66@gmail.com"). A broken image is never shown.

Carousel: up to 4 slides at 728:90 scaled to sidebar width, 5.5 s rotation paused on hover/focus, dots, links open in a new tab with rel="noopener noreferrer sponsored". Links keep their own parameters; utm_source=traffic66, utm_medium=sponsor and utm_campaign= are added only when absent. No user or installation data in any request.

Hidden when /api/status reports registered (removed if that changes while open). i18n: sponsor.label and sponsor.default in all 15 languages. README, all 15 manuals and CHANGELOG (Unreleased) mention it.

Tests: manifest validation, image type/size checks, cache fallback when GitHub is down, path checks on /api/sponsor/img. Checked in headless Chrome on demo mode: direct GitHub path, GitHub blocked -> server cache, both missing -> text box.

githubflyideas added 2 commits October 17, 2026 13:02
Browser loads the slides from github.com/githubflyideas/ads-sponsor
(traffic66/); if that fails it uses the copy the server keeps in
<data>/sponsor (refreshed at start and every 6 h while unregistered,
served at /api/sponsor); if that fails too, a built-in text box.
Hidden once registered. Not in the TUI. No version bump.
@githubflyideas
githubflyideas merged commit ce2be21 into main Oct 17, 2026
9 checks passed
@githubflyideas
githubflyideas deleted the sponsor-slot branch October 17, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant