How the side game sits on the operator's page · desktop & mobile
What you are looking at
Both screens run a mock operator page (operator-mock.html). Everything inside it is the operator's own page,
except two iframes that load play.africajackpot.io:
Gold dashed = Africa Jackpot (ours) — the banner at the top and the transparent wheel overlay on top of the base game.
Blue dashed = your base game — untouched; the overlay is click-through until a jackpot spin starts.
Round flow
player plays a round→your server: POST /api/contribute→postMessage AJ:contribute-result→SPIN button (tap or 5 s auto)→wheel → prize→AJ:win-collected → credit wallet
Player toggle ON/OFF in the banner (default ON). OFF = net over the banner, no spins; you receive AJ:opt-in-changed and stop contributing for that player.
Embed (2 iframes)
<iframe src=".../?mode=banner"> at the top — height set from AJ:resize. <iframe src=".../?mode=overlay" allowtransparency> absolutely positioned over the game area, pointer-events:none until AJ:overlay-show.
Drop-in helper: aj-embed.js — one call creates both iframes and handles the handshake, height, click-through and ON/OFF sync. Diagnostics: add ?ajdiag=1 to your page. Full guide: docs/widget-integration.md · mock alone: operator-mock.html
Desktop · 1280 px wide (scaled to fit)
Mobile · 390 × 844 (iPhone)
“How do I know I did it right?” — run the same checks we run
The helper contains an automated self-test. Below it runs live against the mobile frame so you can see what a passing report looks like. On your own page open it with ?ajdiag=1, press ▶ Run checks in the corner panel, and send us the copied report if anything is red.
What it does (≈8 s): waits for both iframes → pings the overlay → measures that the overlay covers the game area and that the area is big enough → confirms clicks reach your game while idle → pushes a sandbox win and confirms the SPIN gate appears and is tappable → cancels it and confirms click-through returns → switches the player OFF and confirms a result is refused → pushes 10/9/7-digit pools and confirms they fit the banner.