-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCaptchaCustomByUserTrue_hCaptcha_select.js
69 lines (68 loc) · 2.9 KB
/
CaptchaCustomByUserTrue_hCaptcha_select.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
var service = GetInputConstructorValue("service", loader);
if (service["original"].length == 0) {
Invalid(tr("Service") + " " + tr("is empty"));
return;
};
var serviceKey = GetInputConstructorValue("serviceKey", loader);
var serverUrl = GetInputConstructorValue("serverUrl", loader);
var replaceService = GetInputConstructorValue("replaceService", loader);
if (replaceService["original"].length == 0) {
Invalid(tr("Replace Service") + " " + tr("is empty"));
return;
};
var replaceTo = GetInputConstructorValue("replaceTo", loader);
var siteKey = GetInputConstructorValue("siteKey", loader);
if (siteKey["original"].length == 0) {
Invalid(tr("Site Key") + " " + tr("is empty"));
return;
};
var siteURL = GetInputConstructorValue("siteURL", loader);
if (siteURL["original"].length == 0) {
Invalid(tr("Site URL") + " " + tr("is empty"));
return;
};
var isInvisible = GetInputConstructorValue('isInvisible', loader);
var useProxy = GetInputConstructorValue("useProxy", loader);
var proxyType = GetInputConstructorValue("proxyType", loader);
var proxy = GetInputConstructorValue("proxy", loader);
var proxyLogin = GetInputConstructorValue("proxyLogin", loader);
var proxyPassword = GetInputConstructorValue("proxyPassword", loader);
var userAgent = GetInputConstructorValue("userAgent", loader);
var enterprisePayload = GetInputConstructorValue("enterprisePayload", loader);
var delayFirstResult = GetInputConstructorValue("delayFirstResult", loader);
var captchaDomain = GetInputConstructorValue("captchaDomain", loader);
if (delayFirstResult["original"].length == 0) {
Invalid(tr("Delay before the first result") + " " + tr("is empty"));
return;
};
var delayResults = GetInputConstructorValue("delayResults", loader);
if (delayResults["original"].length == 0) {
Invalid(tr("Delay between receiving results") + " " + tr("is empty"));
return;
};
var Save = this.$el.find("#Save").val().toUpperCase();
try {
var code = loader.GetAdditionalData() + _.template($("#CaptchaCustomByUserTrue_hCaptcha_code").html())({
"service": service["updated"],
"serviceKey": serviceKey["updated"],
"serverUrl": serverUrl["updated"],
"siteKey": siteKey["updated"],
"siteURL": siteURL["updated"],
"replaceService": replaceService["updated"],
"replaceTo": replaceTo["updated"],
"isInvisible": isInvisible['updated'],
"useProxy": useProxy["updated"],
"proxy": proxy["updated"],
"proxyType": proxyType["updated"],
"proxyLogin": proxyLogin["updated"],
"proxyPassword": proxyPassword["updated"],
"userAgent": userAgent["updated"],
"enterprisePayload": enterprisePayload["updated"],
"delayFirstResult": delayFirstResult["updated"],
"delayResults": delayResults["updated"],
"captchaDomain": captchaDomain["updated"],
"variable": "VAR_" + Save
});
code = Normalize(code, 0);
BrowserAutomationStudio_Append("", BrowserAutomationStudio_SaveControls() + code, action, DisableIfAdd);
} catch (e) {}