-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLuaREPL.js
33 lines (31 loc) · 963 Bytes
/
LuaREPL.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
function activate(self) {
let svg=self.contentDocument;
function setClass(rElem,sElem) {
if(rElem) rElem.removeClass("svgSofGlow");
sElem.addClass("svgSofGlow");
}
function svgEdit() {
setClass(null, $("#svgResults",svg).html("Edit Lua"));
};
function svgSave(){
setClass($("#svgResults",svg),$("#svgSave",svg));
};
function svgExecute(){
setClass($("#svgSave",svg),$("#svgExecute",svg));
};
function svgResponse(){
setClass($("#svgExecute",svg),$("#svgResponse",svg));
};
function svgResults() {
setClass($("#svgResponse",svg), $("#svgResults",svg).html("Results"));
};
let action=[svgEdit,svgSave,svgExecute,svgResponse,svgResults];
let cnt=0;
svgEdit();
setInterval(function() {
action[++cnt % action.length]();
},1000);
};
$(function() {
document.getElementById("LuaREPL").onload = function() { activate(this); }
});