mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-11 20:21:03 +00:00
Update chrome.js
This commit is contained in:
parent
da671ca7bc
commit
3d15aef7c9
|
@ -28,6 +28,7 @@ var ChromeObject = function() {
|
|||
"port": 1080
|
||||
};
|
||||
this.inPrivate = false;
|
||||
this.userAgent = null;
|
||||
|
||||
// dependencies
|
||||
this.oAutoIt = null;
|
||||
|
@ -169,6 +170,11 @@ var ChromeObject = function() {
|
|||
return this;
|
||||
};
|
||||
|
||||
this.setUserAgent = function(ua) {
|
||||
this.userAgent = ua;
|
||||
return this;
|
||||
};
|
||||
|
||||
this.open = function(url) {
|
||||
this.setProfile(this.profileName, this.installedDir);
|
||||
|
||||
|
@ -256,6 +262,9 @@ var ChromeObject = function() {
|
|||
|
||||
// set user data directory
|
||||
cmd.push("--user-data-dir=\"" + this.userDataDir + "\"");
|
||||
|
||||
// set user agent
|
||||
cmd.push("--user-agent=\"" + this.userAgent + "\"");
|
||||
|
||||
// set URL
|
||||
cmd.push("\"" + url + "\"");
|
||||
|
@ -476,8 +485,8 @@ var ChromeObject = function() {
|
|||
}
|
||||
}
|
||||
|
||||
// calling `onfocus` event
|
||||
this.dispatchEvent(new STD.Event("focus"));
|
||||
// calling `onfocus` event
|
||||
this.dispatchEvent(new STD.Event("focus"));
|
||||
|
||||
return title;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user