Repository navigation
Sponsor banner in the sidebar for unregistered installations - #23
Merged
Merged
Conversation
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
force-pushed
the
sponsor-slot
branch
from
October 17, 2026 04:02
3cbfc15 to
2d92dae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
traffic66/sponsors.jsonand images from raw.githubusercontent.com/githubflyideas/ads-sponsor (3 s timeout, no credentials, no referrer, 30 min sessionStorage cache)./api/sponsor, the last good set the server downloaded into<data>/sponsor(at start and every 6 h, skipped while registered; 10 s timeout, UAtraffic66/<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).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.labelandsponsor.defaultin 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.