replace-outbound-value
The replace-outbound-value snippet overrides return values of functions or attributes according to the given parameters.
Parameters
|
Name |
Description |
Mandatory |
Default |
|---|---|---|---|
|
method |
The method to trap (any function or attribute under window, e.g. |
Yes |
n.a. |
|
search |
The text or regex pattern to replace. |
Yes |
n.a. |
|
replacement |
The replacement text. |
No |
empty string |
|
decodeMethod |
Decode method before replacing. Currently only "base64" supported. |
No |
empty string |
|
path |
Dot-separated path to the property in returned objects. |
No |
empty string |
|
stack |
Comma-separated list of strings to check in the stack trace. |
No |
empty string |
Filter examples
|
Filter |
Result |
|---|---|
|
|
Replaces |
|
|
Removes text matching the regex from the return value. |
|
|
Replaces 'ads' with 'content' in base64 encoded output. |
|
|
Replaces 'premium' with 'basic' only in |