Evaluate JavaScript in Page
gv_eval_jsExecute JavaScript in the active page to extract CSRF tokens, read local state, or call site functions, returning the evaluated result.
Instructions
Run JavaScript in the active page and return the result.
Use cases:
Extract CSRF tokens: document.querySelector('meta[name=csrf-token]').content
Call site JS: window.app.generateSignature(payload)
Read state: localStorage.getItem('auth_token')
Read hidden fields: document.querySelector('#token').value
The script can be an expression or a function. If arg is provided,
it's passed as the first parameter to a function script.
Args: script: JS expression or arrow function. arg: Optional argument to pass to a function script.
Returns whatever the JS evaluates to.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| arg | No | ||
| script | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |