DocumentationCustomize the Page

Customize the Page

Inject CSS, run scripts, and hide elements.

Hide elements

{
  "url": "https://example.com",
  "customize": {
    "hide_selectors": [".cookie-banner", "#chat-widget"]
  }
}

Inject CSS

{
  "url": "https://example.com",
  "customize": {
    "css": "body { background: #fff; }"
  }
}

Run scripts

{
  "url": "https://example.com",
  "customize": {
    "scripts": "document.body.classList.add('capture-mode');",
    "scripts_wait_until": ["domcontentloaded"]
  }
}
Scripts and navigation

If your script triggers navigation, set customize.scripts_wait_until so the capture waits for the new page state.

CSP bypass

Some sites block injected scripts with CSP. Use auth.bypass_csp if needed.

{
  "url": "https://example.com",
  "auth": { "bypass_csp": true },
  "customize": { "scripts": "/* custom script */" }
}
Updated 1 day ago
Did this page help you?