Normal netscript supported functions now highlighted in different color

This commit is contained in:
danielyxie 2017-09-08 18:42:56 -05:00
parent 19b861c4f7
commit 68fcc12ac8
2 changed files with 853 additions and 55 deletions

905
dist/bundle.js vendored

File diff suppressed because one or more lines are too long

@ -1,5 +1,6 @@
var ace = require('brace'); var ace = require('brace');
require('brace/mode/javascript'); require('brace/mode/javascript');
require('brace/mode/netscript');
require('brace/theme/chaos'); require('brace/theme/chaos');
require('brace/theme/chrome'); require('brace/theme/chrome');
require('brace/theme/monokai'); require('brace/theme/monokai');
@ -44,7 +45,7 @@ function scriptEditorInit() {
//Initialize ACE Script editor //Initialize ACE Script editor
var editor = ace.edit('javascript-editor'); var editor = ace.edit('javascript-editor');
editor.getSession().setMode('ace/mode/javascript'); editor.getSession().setMode('ace/mode/netscript');
editor.setTheme('ace/theme/monokai'); editor.setTheme('ace/theme/monokai');
document.getElementById('javascript-editor').style.fontSize='16px'; document.getElementById('javascript-editor').style.fontSize='16px';
editor.setOption("showPrintMargin", false); editor.setOption("showPrintMargin", false);