mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-14 05:31:03 +00:00
Update chrome.js
This commit is contained in:
parent
3d15aef7c9
commit
3f961cd7a2
|
@ -141,7 +141,7 @@ var ChromeObject = function() {
|
||||||
|
|
||||||
// disable popop blocking
|
// disable popop blocking
|
||||||
cmd.push("--disable-popup-blocking");
|
cmd.push("--disable-popup-blocking");
|
||||||
|
|
||||||
// disable 3d
|
// disable 3d
|
||||||
cmd.push("--disable-3d-apis");
|
cmd.push("--disable-3d-apis");
|
||||||
|
|
||||||
|
@ -244,16 +244,22 @@ var ChromeObject = function() {
|
||||||
if (this.debuggingPort > 0) {
|
if (this.debuggingPort > 0) {
|
||||||
cmd.push("--remote-debugging-port=" + this.debuggingPort);
|
cmd.push("--remote-debugging-port=" + this.debuggingPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
// disable default browser check
|
// disable default browser check
|
||||||
cmd.push("--no-default-browser-check");
|
cmd.push("--no-default-browser-check");
|
||||||
|
|
||||||
// disable popop blocking
|
// disable popop blocking
|
||||||
cmd.push("--disable-popup-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
|
// set profile directory
|
||||||
cmd.push("--profile-directory=\"" + this.profileName + "\"");
|
cmd.push("--profile-directory=\"" + this.profileName + "\"");
|
||||||
|
|
||||||
// set proxy configuration
|
// set proxy configuration
|
||||||
if (this.proxy != null) {
|
if (this.proxy != null) {
|
||||||
console.log("Enabled proxy server:", this.proxy.protocol + "://" + this.proxy.host + ":" + this.proxy.port);
|
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
|
// set user data directory
|
||||||
cmd.push("--user-data-dir=\"" + this.userDataDir + "\"");
|
cmd.push("--user-data-dir=\"" + this.userDataDir + "\"");
|
||||||
|
|
||||||
// set user agent
|
// set user agent
|
||||||
cmd.push("--user-agent=\"" + this.userAgent + "\"");
|
if (this.userAgent != null) {
|
||||||
|
cmd.push("--user-agent=\"" + this.userAgent + "\"");
|
||||||
|
}
|
||||||
|
|
||||||
// set URL
|
// set URL
|
||||||
cmd.push("\"" + url + "\"");
|
cmd.push("\"" + url + "\"");
|
||||||
|
|
||||||
// run
|
// run
|
||||||
shell.runAs(this.binPath, cmd);
|
shell.runAs(this.binPath, cmd);
|
||||||
sleep(300);
|
sleep(300);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user