@intuned/runtime-dev 1.1.3-dev-01 → 1.1.3-dev-002
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.
|
@@ -48,10 +48,8 @@ async function getProductionPlaywrightConstructs({
|
|
|
48
48
|
headless,
|
|
49
49
|
viewport: null,
|
|
50
50
|
proxy,
|
|
51
|
-
downloadsPath
|
|
52
|
-
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/130.0.6723.31 Safari/537.36"
|
|
51
|
+
downloadsPath
|
|
53
52
|
});
|
|
54
|
-
await context.addInitScript(fingerprintToScript());
|
|
55
53
|
context.once("close", async () => {
|
|
56
54
|
try {
|
|
57
55
|
await (0, _fsExtra.rm)(userDataDir, {
|
|
@@ -187,18 +185,4 @@ async function getRemotePlaywrightContext(cdpAddress) {
|
|
|
187
185
|
browser,
|
|
188
186
|
context
|
|
189
187
|
};
|
|
190
|
-
}
|
|
191
|
-
function fingerprintToScript() {
|
|
192
|
-
return `
|
|
193
|
-
(() => {
|
|
194
|
-
|
|
195
|
-
// WebGL Spoofing
|
|
196
|
-
const getParameterProxy = WebGLRenderingContext.prototype.getParameter;
|
|
197
|
-
WebGLRenderingContext.prototype.getParameter = function(param) {
|
|
198
|
-
if (param === 37445) return 'Google Inc. (Apple)';
|
|
199
|
-
if (param === 37446) return 'ANGLE (Apple, Apple M1 Pro, OpenGL 4.1)'; // UNMASKED_RENDERER_WEBGL
|
|
200
|
-
return getParameterProxy.call(this, param);
|
|
201
|
-
};
|
|
202
|
-
})();
|
|
203
|
-
`;
|
|
204
188
|
}
|