-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathJeviClient-1.1.html
47 lines (44 loc) · 1.61 KB
/
JeviClient-1.1.html
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
<script>
alert("Jevi 클라이언트 - 실행시작");
Entry.block.add_value_to_list.func = function(e, t) {
var n = t.getField('LIST', t),
o = t.getValue('VALUE', t),
r = Entry.variableContainer.getList(n, e);
return r.array_ || (r.array_ = []), r.array_.push({
data: o
}), $.get(`%0/?cod=push&_id=${Entry.projectId}&varName=${r.name_}&data=${o}&type=list`, function(data){}), r.updateView(), t.callReturn()
};
Entry.block.set_variable.func = function(t,e){
var n = e.getField("VARIABLE",e),
o = e.getValue("VALUE",e),
r = Entry.variableContainer.getVariable(n,t);
return $.get(`%0/?cod=push&_id=${Entry.projectId}&varName=${r.name_}&data=${o}&type=var`, function(data){}),
e.callReturn()
}
setInterval(function() {
var cont = Entry.variableContainer.getListByName('JVset');
var getOpt = [];
var type = 'list';
for(var i = 0; i < cont.array_.length; i++){
getOpt = cont.array_[i].data.split(' ');
if(getOpt.length>1){
type=(getOpt[1]=="-v")?"var":"list";
}else{
if(Entry.variableContainer.getVariableByName(getOpt[0])){
type="var";
}else{
type="list";
}
}
if(type=="list"){
$.get(`%0/?cod=get&type=${type}&_id=${Entry.projectId}&varName=${getOpt[0]}`, function(_d) {
Entry.variableContainer.getListByName(_d.result.varn).setArray(_d.basic.concat(_d.result._data));
});
}else if(type=="var"){
$.get(`%0/?cod=get&type=${type}&_id=${Entry.projectId}&varName=${getOpt[0]}`, function(_d) {
Entry.variableContainer.getVariableByName(_d.result.varn).setValue(_d.result._data[_d.basic[3].data][_d.result.varn]);
});
}
}
}, 1000);
</script>