mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 23:14:58 +00:00
Update chrome.js
This commit is contained in:
parent
b7914adc5c
commit
e6f63c7d99
|
@ -781,11 +781,14 @@ var ChromeObject = function() {
|
||||||
this.oAutoIt.Send("{SPACE}");
|
this.oAutoIt.Send("{SPACE}");
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setValue = function(selector, value, repeat) {
|
this.setValue = function(selector, value, searchIndex) {
|
||||||
var s = encodeURIComponent(value), i = 0;
|
var searchIndex = (typeof searchIndex !== "undefined" ? searchIndex : 0);
|
||||||
while (i < repeat) {
|
var s = encodeURIComponent(value);
|
||||||
|
|
||||||
|
if (searchIndex > 0) {
|
||||||
|
this.evaluate('Object.values(document.querySelectorAll("' + selector + '"))[' + searchIndex + '].value = decodeURIComponent("' + s + '");');
|
||||||
|
} else {
|
||||||
this.evaluate('document.querySelector("' + selector + '").value = decodeURIComponent("' + s + '")');
|
this.evaluate('document.querySelector("' + selector + '").value = decodeURIComponent("' + s + '")');
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user