-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathks_get_email_select.js
68 lines (65 loc) · 2.07 KB
/
ks_get_email_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
var token = GetInputConstructorValue('token', loader)
if (token['original'].length == 0) {
Invalid(tr('The parameter "') + tr('Token') + tr('" is not specified'))
return
}
var site = GetInputConstructorValue('site', loader)
if (site['original'].length == 0) {
Invalid(tr('The parameter "') + tr('Site') + tr('" is not specified'))
return
}
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 mail_type = GetInputConstructorValue('mail_type', loader)
var sender = GetInputConstructorValue('sender', loader)
var subject = GetInputConstructorValue('subject', loader)
var email = GetInputConstructorValue('email', loader)
var regex = GetInputConstructorValue('regex', loader)
var soft = GetInputConstructorValue('soft', loader)
var clear = $('#clear').is(':checked')
var investor = $('#investor').is(':checked')
var strictMode = $('#strictMode').is(':checked')
var Save = this.$el.find('#Save').val().toUpperCase()
try {
var code =
loader.GetAdditionalData() +
_.template($('#ks_get_email_code').html())({
token: token['updated'],
site: site['updated'],
mail_type: mail_type['updated'],
sender: sender['updated'],
subject: subject['updated'],
email: email['updated'],
regex: regex['updated'],
soft: soft['updated'],
clear: clear,
investor: investor,
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) {}