Skip to content

Latest commit

 

History

History
91 lines (63 loc) · 3.03 KB

config.md

File metadata and controls

91 lines (63 loc) · 3.03 KB

Client Config (/api/cfg)

Reverse-engineered feature-flag configuration used by the public frontend.

GET /api/cfg — retrieved with cache: "no-store" and a 6 s timeout. The response controls which features of the single-page application are enabled. All fields are optional; the client falls back to safe defaults when absent or on error (.catch(() => L(false))).


Request

GET /api/cfg

No parameters, no auth headers. Response is JSON.


Fields

Field Type Meaning Client flag / effect
live bool Live mode. Presence/absence toggles live map behavior. vC.LIVE
ct string Short client tag/token. Default Tv9DrbFch7Ji8FPGN3UNbw. vC.ct
su bool Show UI suggestions. hC.UI
edit bool Edit mode. Adds editok to <body>; when the property exists but is false adds noedit.
ssd bool Server-side data / snapshot rendering. window.__cfgSSD
vw bool Viewport mode. window.__cfgVW
conf bool Show confidence block when confidenceBase > 0. window.__cfgConf
w1pub bool "Wave 1" public availability. window.__cfgW1
prices object {min, max} — price input range. Defaults min=40, max=250. window.__cfgPrices
wm int Wall-marks counter (rendered as wm/1000 in UI). window.__cfgWallMarks
fr bool Friends feature (friends list + cross-tab sync). gm → jm() → qm()
pick bool Show "Smart Pick" FAB (#pick-fab).
rb bool Show RB demo block. L(t.rb)
lat number Initial center latitude (if present).
lon number Initial center longitude (if present).
name string Initial city name.
slug string Initial city slug.

Client State Objects

Two module-level objects are initialized with defaults and then patched from cfg:

const vC = { ct: "Tv9DrbFch7Ji8FPGN3UNbw", LIVE: false, CAP: 2, CAP_H: 24 };
const hC = { UI: false };
  • vC.CAP / vC.CAP_H — capacity constants (2, 24) not sourced from cfg.
  • gm (module var) — mirrors cfg.fr; combined with window._frMock in jm().

Friends Feature (fr)

gm = !!cfg.fr;
function jm(){ return !!window._frMock || gm; }
function qm(){ return !!bm && jm() === true && Bm.st !== "off"; }

Cross-tab sync uses the gb_fr_sync localStorage key via a storage event listener. window._frMock forces the feature on for testing.


Smart Pick (pick)

  • If pick is true (or a forced test flag U), #pick-fab is shown.
  • If pick === false, #pick-float is hidden.

Price Range (prices)

function vb(){
  const t = window.__cfgPrices || null;
  return { min: (t && +t.min) || 40, max: (t && +t.max) || 250 };
}

Used to constrain the fuel-price input for /api/price.


Notes

All information was obtained from the publicly distributed JavaScript bundle. No server-side source code or private implementation details are included.