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