-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathks_get_domains_select.js
51 lines (51 loc) · 1.6 KB
/
ks_get_domains_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
var domains = GetInputConstructorValue('domains', loader)
if (domains['original'].length == 0) {
Invalid(tr('The parameter "') + tr('Domains') + tr('" is not specified'))
return
}
var token = GetInputConstructorValue('token', loader)
var site = GetInputConstructorValue('site', loader)
var minPrice = GetInputConstructorValue('minPrice', loader)
var maxPrice = GetInputConstructorValue('maxPrice', loader)
var timeout = GetInputConstructorValue('timeout', loader)
if (timeout['original'].length == 0) {
Invalid(tr('The parameter "') + tr('Timeout') + tr('" is not specified'))
return
}
var interval = GetInputConstructorValue('interval', loader)
if (interval['original'].length == 0) {
Invalid(tr('The parameter "') + tr('Interval') + tr('" is not specified'))
return
}
var maxTime = GetInputConstructorValue('maxTime', loader)
if (maxTime['original'].length == 0) {
Invalid(
tr('The parameter "') + tr('Time threshold') + tr('" is not specified')
)
return
}
var strictMode = $('#strictMode').is(':checked')
var Save = this.$el.find('#Save').val().toUpperCase()
try {
var code =
loader.GetAdditionalData() +
_.template($('#ks_get_domains_code').html())({
domains: domains['updated'],
token: token['updated'],
site: site['updated'],
minPrice: minPrice['updated'],
maxPrice: maxPrice['updated'],
strictMode: strictMode,
timeout: timeout['updated'],
maxTime: maxTime['updated'],
interval: interval['updated'],
variable: 'VAR_' + Save
})
code = Normalize(code, 0)
BrowserAutomationStudio_Append(
'',
BrowserAutomationStudio_SaveControls() + code,
action,
DisableIfAdd
)
} catch (e) {}