5 Commits

Author SHA1 Message Date
martbost b84eed3be5 Theme switch: auto | light | dark, stored in localStorage ls.theme and on the account, applied before first paint on every page
themehead.js is the one source of the tiny inline head script (and of AUTO_DEFAULT, the one constant Marty decides later: 0 = nothing stored keeps the page's current look, light for Control Room and public pages, dark for the sapphire pages; 1 = follow the device). The script sets data-theme on <html> from ls.theme (auto follows prefers-color-scheme and tracks changes live) and exposes window.LSTheme. tools/stamp-theme-head.cjs writes it into every static page before the first stylesheet with data-theme-base on <html>; blog, leaderboard, what's-new, the badge page, the unsubscribe page and the wall 404 read the module directly. The site CSP allows inline scripts by hash only, so themehead.CSP_HASH joins script-src (the script was silently blocked until then).

Account side: accounts.theme (JSON store and MySQL, alterSafe column), in the public account JSON and /api/me; POST /api/my/profile {theme} rides the existing profile save path and never touches the username. cr-shell.js renders a Light / Dark / Auto segmented control in the topbar of every Control Room screen and paints every .theme-seg on the page (the Profile pane gains an Appearance card with the same control); a click applies at once, saves locally and to the account when signed in; at sign-in the account value wins over the local one, and a local choice is pushed up when the account has none yet. view.html stops reading an undefined --bg so its light variant has a light stage. ?v= tags bumped on every changed stylesheet and script (20261101t / ls20261101t).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-01 10:44:40 -06:00
martbost 98e3ed36d8 Conversion tracking fixes (Marty approved 2026-10-26): own clicks are tests on every click type, Banner Spin straight-to-page clicks carry lsclk
1. Own clicks: a goal owner's own click on ANY click type (LinkSpin/InstantAdPay ads, spin links, Banner Spins) is kept as a test, never counted, never fires a goal postback. Own = ad click flagged self for that owner, a spin-link / Banner Spin click marked at click time (signed in as the owner, or from an owner soft key: markOwnClick in server.js), or the clicking or converting browser's soft key is one the owner signs in from. auth.onSeen notes LinkSpin session soft keys (throttled, kept 31 days in convtrack.json S.own); /api/partner/clicks takes owners [{owner, sk, ts}] from InstantAdPay before the clicks, so IAP members' own browsers are known too. Linked positions share the owner's email. X-LS-Result adds ;self. partnerSummary returns selfTests for the IAP card. Conversions screen copy: test with Send a test conversion and the &test=1 page check, own clicks never count (conversions.js ?v=20261026a).
3. Banner Spin: a click whose target is a direct page (not a /r/ spin link) gets ?lsclk=<k click id> when the owner tracks goals (string insert like lsconv.withClickId: params kept, before #hash, an existing lsclk never replaced). convtrack.lookup resolves k ids through bannerspin.clickById; conversions record k:'bspin' with the Banner Spin, banner, page and source; report By Banner Spin, CSV site 'Banner Spin', postback ctx with its sub ids.
Guides: /conversion-tracking (Banner Spin straight to a page now counted, own clicks on every type are tests, By Banner Spin), /refuel tile. Chatbot CANNED + FACTS, KNOWLEDGE_DATE 2026-10-26.
QA: convpixel 77/77 (new: owner soft keys, own ad/spin/Banner Spin/IAP clicks as tests, stranger still counts, own-browser conversion, withClickId, Banner Spin lsclk + By Banner Spin + spin-link banner untouched, selfTests in the IAP summary, no postback for own clicks); lsid 31/31; fuel all pass (engine.js / engine-room.js / kit.js untouched, byte-identical with InstantAdPay); bannerspin 75/75; member walk 0 bugs; public 0 bugs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 06:19:54 -05:00
martbost 93317d6ba0 Refuel guide: why-cards 2 x 2 on desktop
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:20:51 -05:00
martbost 9ce57ae1ff Refuel guide: the walkthrough video (Marty approved 2026-10-24) replaces the banner, plus a 'Why keep refueling' section (steady traffic, useful numbers, fresh creative, the climbing bonus); training card gets the video
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:17:20 -05:00
martbost e5fb985c6b Fuel Your Offers member guide at /refuel (Marty, 2026-10-24): LinkSpin-first wording (Credits, Ads, Banner Spin), same rules as InstantAdPay's refuel.js, flow drawn in HTML/CSS (works at 390 px), pub.css look, hero og:image banners/fuel-your-offers-1200x675.jpg, refuel-guide.js opens join/member/off-site links in a new tab (with ?ref) when framed. Route + TRAFFIC_PAGES + sitemap; Training entry (catalog/training.json "refuel-guide"); "How the Refuel streak works" link on the Monthly Refuel panel and in the Engine Room.
Fixes: Engine Room streak line no longer asks for the other site once both are refueled (engine.js + engine-room.js copied from InstantAdPay, byte-identical). Ads-screen Monthly Refuel rows had no spacing ("InstantAdPay+30%"): own flex row style. Load into my Banner Spin: size checkboxes, pre-ticked to what fits the tier (728x90 + 300x250 on an empty Starter), and kitspin.js returns one plain message: what loaded, what did not and why (tier holds N Banner Spins), and what to do; /api/my/kits adds spinRoom. Test added (refuel-kit 6/6).
Chatbot CANNED + refuelFact point to /refuel. fuel.js + engine-room.js ?v=20261024rg.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 08:07:32 -05:00