Purpose
Use Inject JavaScript for advanced cleanup, DOM preparation, custom calculations, or interactions that are difficult to express with standard blocks.
How it works
- Executes configured JavaScript inside the current browser page.
- Can wait for completion before continuing.
- Can return command results for inspection.
Configuration fields
| Field | Required | Default | Description |
|---|---|---|---|
| JavaScript Code | Yes | - | Code to run in the browser context. |
| Wait for completion | No | true | Whether UScraper should wait for the script to finish. |
| Timeout | No | 10 | Maximum seconds for script execution. |
Usage notes
- Keep injected scripts small and deterministic.
- Use standard blocks first; JavaScript is best for edge cases.
- The script runs with page access, so avoid pasting untrusted code.