mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-09 13:16:05 +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.setValue = function(selector, value, repeat) {
|
||||
var s = encodeURIComponent(value), i = 0;
|
||||
while (i < repeat) {
|
||||
this.setValue = function(selector, value, searchIndex) {
|
||||
var searchIndex = (typeof searchIndex !== "undefined" ? searchIndex : 0);
|
||||
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 + '")');
|
||||
i++;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user