// ── Pre-recording flow ──────────────────────────────────────────────────── // The moment BEFORE a recording starts is where privacy happens: blur the // sensitive areas first, then count down, then roll. Orchestrates the // existing blur tool (real backdrop blur — redacted pixels are what the // recording captures) into a pick-first flow, plus a 3-2-1 countdown. import { activateBlurMode, deactivateBlurMode, isBlurModeActive, removeAllBlurBoxes, undoLastBlur } from "./blur-tool"; import { setInnerHTML, createStyleTag } from "./helpers"; const COUNTDOWN_ID = "tracebug-record-countdown"; const ARM_BAR_ID = "tracebug-record-armbar"; const PICKER_HINT_ID = "tracebug-picker-hint"; const STYLE_ID = "tracebug-pre-record-styles"; // All of this used to be setInlineStyle() / el.style.x = y calls — a page // with a strict CSP (style-src with a nonce, no 'unsafe-inline') blocks an // inline style attribute or a direct .style mutation outright, with no // nonce/hash escape for either (that's spec'd, not a gap to work around). // Confirmed on a real page: these elements got appended with none of this // applied, so the picker hint / countdown / blur arm-bar were never visible. // createStyleTag() already attaches the page's own nonce to the