mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 15:04:58 +00:00
Update chrome.js
This commit is contained in:
parent
a0cf73944c
commit
3e06104167
|
@ -49,11 +49,17 @@ var ChromeObject = function() {
|
|||
this.title = "";
|
||||
this.frameIndex = -1;
|
||||
|
||||
this.isPreventEvaluate = false;
|
||||
|
||||
this.create = function() {
|
||||
this.oAutoIt = AutoItX.create().getInterface();
|
||||
return this;
|
||||
};
|
||||
|
||||
this.setIsPreventEvaluate = function(flag) {
|
||||
this.isPreventEvaluate = true;
|
||||
};
|
||||
|
||||
this.setBinPath = function(path) {
|
||||
this.binPath = path;
|
||||
return this;
|
||||
|
@ -450,6 +456,8 @@ var ChromeObject = function() {
|
|||
};
|
||||
|
||||
this.evaluate = function(expression, frameIndex) {
|
||||
if (this.isPreventEvaluate) return;
|
||||
|
||||
var frameIndex = (typeof frameIndex !== "undefined" ? frameIndex : this.frameIndex);
|
||||
|
||||
if (frameIndex > -1) {
|
||||
|
@ -1153,7 +1161,7 @@ exports.startDebug = function(url, proxy, profileName, debuggingPort, isPreventP
|
|||
.setIsPreventProxy(isPreventProxy)
|
||||
.addUserAgentsFromFile("data\\Chrome.txt")
|
||||
.addUserAgentsFromFile("data\\Edge.txt")
|
||||
.addUserAgentsFromFile("data\\Safari.txt")
|
||||
.addUserAgentsFromFile("data\\Safari.txt")
|
||||
.open(url)
|
||||
;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user