Update chrome.js

This commit is contained in:
Namhyeon Go 2022-01-09 02:09:50 +09:00 committed by GitHub
parent 3d15aef7c9
commit 3f961cd7a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,7 +141,7 @@ var ChromeObject = function() {
// disable popop blocking
cmd.push("--disable-popup-blocking");
// disable 3d
cmd.push("--disable-3d-apis");
@ -244,16 +244,22 @@ var ChromeObject = function() {
if (this.debuggingPort > 0) {
cmd.push("--remote-debugging-port=" + this.debuggingPort);
}
// disable default browser check
cmd.push("--no-default-browser-check");
// disable popop blocking
cmd.push("--disable-popup-blocking");
// disable 3D
cmd.push("--disable-3d-apis");
// block non-proxyed webrtc traffic
cmd.push("--force-webrtc-ip-handling-policy=disable-non-proxied-udp");
// set profile directory
cmd.push("--profile-directory=\"" + this.profileName + "\"");
// set proxy configuration
if (this.proxy != null) {
console.log("Enabled proxy server:", this.proxy.protocol + "://" + this.proxy.host + ":" + this.proxy.port);
@ -263,12 +269,14 @@ var ChromeObject = function() {
// set user data directory
cmd.push("--user-data-dir=\"" + this.userDataDir + "\"");
// set user agent
cmd.push("--user-agent=\"" + this.userAgent + "\"");
// set user agent
if (this.userAgent != null) {
cmd.push("--user-agent=\"" + this.userAgent + "\"");
}
// set URL
cmd.push("\"" + url + "\"");
// run
shell.runAs(this.binPath, cmd);
sleep(300);