gologin 3.0.1 → 3.0.2
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.
- package/CHANGELOG.md +6 -0
- package/examples/puppeter/cloud-browser.js +5 -3
- package/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/gologin.js +8 -0
- package/screenshot.png +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// It will handle the browser start and close management - you just need to control the browser with puppeteer
|
|
3
3
|
import puppeteer from 'puppeteer-core';
|
|
4
4
|
|
|
5
|
-
const token = process.env.GL_API_TOKEN || '
|
|
6
|
-
const profileId = '
|
|
5
|
+
const token = process.env.GL_API_TOKEN || 'your dev token here';
|
|
6
|
+
const profileId = 'profile ID';
|
|
7
7
|
|
|
8
8
|
const CLOUD_BROWSER_URL = `https://cloudbrowser.gologin.com/connect?token=${token}&profile=${profileId}`;
|
|
9
9
|
const STOP_PROFILE_URL = `https://api.gologin.com/browser/${profileId}/web`;
|
|
@@ -31,7 +31,9 @@ async function main() {
|
|
|
31
31
|
const page = await browser.newPage();
|
|
32
32
|
|
|
33
33
|
await page.goto('https://iphey.com/', { waitUntil: 'networkidle2' });
|
|
34
|
-
await page
|
|
34
|
+
const status = await page.$eval('.trustworthy:not(.hide)',
|
|
35
|
+
(elt) => elt?.innerText?.trim(),
|
|
36
|
+
);
|
|
35
37
|
|
|
36
38
|
return status;
|
|
37
39
|
}
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
package/src/gologin.js
CHANGED
|
@@ -78,6 +78,7 @@ export class GoLogin {
|
|
|
78
78
|
this.newProxyOrbitaMajorVersion = 135;
|
|
79
79
|
this.proxyCheckTimeout = options.proxyCheckTimeout || 13 * 1000;
|
|
80
80
|
this.proxyCheckAttempts = options.proxyCheckAttempts || 3;
|
|
81
|
+
this.customChromeFrame = options.customChromeFrame;
|
|
81
82
|
|
|
82
83
|
if (options.tmpdir) {
|
|
83
84
|
this.tmpdir = options.tmpdir;
|
|
@@ -581,6 +582,13 @@ export class GoLogin {
|
|
|
581
582
|
|
|
582
583
|
this.browserLang = isMAC ? 'en-US' : checkAutoLangResult;
|
|
583
584
|
const prefsToWrite = Object.assign(preferences, { gologin });
|
|
585
|
+
if (this.customChromeFrame === false) {
|
|
586
|
+
prefsToWrite.browser = {
|
|
587
|
+
...(prefsToWrite.browser || {}),
|
|
588
|
+
custom_chrome_frame: false,
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
|
|
584
592
|
if (this.browserMajorVersion >= this.newProxyOrbitaMajorVersion && this.proxy?.mode !== 'none') {
|
|
585
593
|
prefsToWrite.proxy = {
|
|
586
594
|
mode: 'fixed_servers',
|
package/screenshot.png
DELETED
|
Binary file
|