emulate_media
Test how pages respond to dark mode, reduced motion, print styles, device viewports, touch, CPU/network limits, and user agents without changing real browser settings.
Instructions
Make the page believe it runs elsewhere, until reset or reload: prefers-color-scheme, prefers-reduced-motion, print mode, navigator.userAgent/platform. user_agent changes only what page JS reads — the request header is network_rules modify_header. via "page" (default for these) only patches matchMedia and, for reduce, zeroes every animation: the site's own @media rules do not apply. via "debugger" emulates like DevTools, so the site's @media (prefers-reduced-motion) rules really apply — use it to check reduced motion with animations — and adds contrast, CPU throttling, network profiles, device viewport with DPR, touch (these imply via debugger). via debugger keeps Chrome's "started debugging this browser" bar until reset: true; in launch mode nobody sees it. Pair with viewport_resize to emulate a device in page mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| via | No | page: script shim, no browser bar; debugger: real emulation (default when a debugger-only option is set) | |
| reset | No | Remove all emulations and detach the debugger | |
| touch | No | Emulate a touch screen (debugger) | |
| device | No | Device metrics override (debugger) | |
| tab_id | No | Target tab; omitted = last tab navigated in this session, else the active one | |
| network | No | DevTools network profile; none turns it off (debugger) | |
| contrast | No | Value reported to prefers-contrast queries (debugger) | |
| printMode | No | Make print media queries match, without opening a print dialog | |
| user_agent | No | Overrides navigator.userAgent and appVersion in the page (not the HTTP header) | |
| colorScheme | No | Value reported to prefers-color-scheme queries | |
| cpu_throttle | No | CPU slowdown factor, e.g. 4 for a mid-range phone; 1 turns it off (debugger) | |
| reducedMotion | No | Value reported to prefers-reduced-motion queries |