@intuned/runtime-dev 1.3.12-ua.1 → 1.3.12-ua.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -87,26 +87,7 @@ async function launchChromium(options) {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
const viewport = null;
|
|
90
|
-
|
|
91
|
-
if (headless) {
|
|
92
|
-
const tmpBrowser = await playwright.chromium.launch({
|
|
93
|
-
executablePath,
|
|
94
|
-
headless,
|
|
95
|
-
proxy,
|
|
96
|
-
downloadsPath,
|
|
97
|
-
args: extraArgs,
|
|
98
|
-
ignoreDefaultArgs: defaultArgsToIgnore
|
|
99
|
-
});
|
|
100
|
-
const tmpContext = await tmpBrowser.newContext({
|
|
101
|
-
viewport
|
|
102
|
-
});
|
|
103
|
-
const tmpPage = await tmpContext.newPage();
|
|
104
|
-
const ua = await tmpPage.evaluate(() => navigator.userAgent);
|
|
105
|
-
await tmpBrowser.close();
|
|
106
|
-
if (ua) {
|
|
107
|
-
userAgent = ua.replace("HeadlessChrome", "Chrome");
|
|
108
|
-
}
|
|
109
|
-
}
|
|
90
|
+
const userAgent = process.env.PLAYWRIGHT_USER_AGENT_OVERRIDE ?? undefined;
|
|
110
91
|
const context = await playwright.chromium.launchPersistentContext(userDataDir, {
|
|
111
92
|
userAgent,
|
|
112
93
|
executablePath,
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|