-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.js
More file actions
42 lines (38 loc) · 1.34 KB
/
Config.js
File metadata and controls
42 lines (38 loc) · 1.34 KB
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
let $Config, editor;
{
editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
mode: "text/javascript",
matchBrackets: true,
autoCloseBrackets: true,
extraKeys: {
"Ctrl-Tab": "autocomplete",
"Ctrl-/": "toggleComment"
},
continueComments: "Enter",
});
editor.setOption("theme", "cobalt");//"erlang-dark");
editor.setSize("100%", "25vh");
editor.on("keyup", function (e, s) {
$rampage = s;
if (s.type == "keyup" && !e.state.completionActive && s.keyCode != 13 && s.keyCode !=
27 && s.keyCode != 32 && s.keyCode != 8 && /^[A-Zа-яА-Яa-z$_]*$/.test(s.key) && s.key
.length == 1 && !s.ctrlKey && !s.altKey) {
CodeMirror.showHint(e, null, {
completeSingle: false
});
// CodeMirror.commands.autocomplete(e, null, {completeSingle: false});
}
});
}
{
let canvas = document.getElementsByClassName("canvas")[0];
$Config = {
type: 'graphics', //graphic/console/api
canvas_size: [canvas.clientWidth, canvas.clientHeight + window.innerHeight / 5, false], //[x,y,вместить]
Debug_Mode: true,
name: "Интерпретатор JsMobileBasic",
fullscreen: false,
window_mount: true
}
}