You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,10 +31,11 @@ This triggers `Runtime.executionContextCreated` events, allowing us to catch the
31
31
32
32
> 🎉 Our tests show that both approaches are currently undetectable by Cloudflare or DataDome.
33
33
34
-
**Important:** After applying the patch, you need to enable it by setting `REBROWSER_PATCHES_RUNTIME_FIX_MODE` environment variable. This allows you to easily switch between patched and non-patched versions based on your business logic.
34
+
Note: you can change settings for this patch on the fly using an environment variable. This allows you to easily switch between patched and non-patched versions based on your business logic.
35
35
36
-
-`REBROWSER_PATCHES_RUNTIME_FIX_MODE=alwaysIsolated`— always run all scripts in isolated context
36
+
-`REBROWSER_PATCHES_RUNTIME_FIX_MODE=alwaysIsolated`— always run all scripts in isolated context (default)
37
37
-`REBROWSER_PATCHES_RUNTIME_FIX_MODE=enableDisable`— use Enable/Disable technique
38
+
-`REBROWSER_PATCHES_RUNTIME_FIX_MODE=0`— completely disable this patch
38
39
-`REBROWSER_PATCHES_DEBUG=1`— enable some debugging messages
39
40
40
41
Remember, you can set these variables in different ways, for example, in code:
@@ -57,9 +58,9 @@ By default, Puppeteer adds `//# sourceURL=pptr:...` to every script in `page.eva
57
58
This patch changes it to `//# sourceURL=app.js`. You can also adjust it via environment variable:
The default utility world name is `'__puppeteer_utility_world__' + packageVersion`. Sometimes you might want to change it to something else. This patch changes it to `util` and allows you to customize it via env variable:
*This env variable cannot be changed on the fly, you have to set it before running your script because it's used at the moment when the module is getting imported.*
81
+
This env variable cannot be changed on the fly, you have to set it before running your script because it's used at the moment when the module is getting imported.
81
82
82
83
*Note: it's not detectable by external website scripts, but Google might use this information in their proprietary Chrome; we never know.*
0 commit comments