Skip to content

Commit 534799b

Browse files
committed
Merge pull request #11 from emackey/fixes
Various fixes
2 parents 6cb9a4b + be3368d commit 534799b

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

static/index.html

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
body {
1010

1111
background-color: #000000;
12-
margin: 0px;
12+
margin: 0;
13+
padding: 0;
1314
overflow: hidden;
1415

1516
}
@@ -180,11 +181,9 @@
180181
return;
181182
}
182183

183-
var effect = document.createElement( 'div' );
184-
document.body.appendChild( effect );
185-
186184
canvas = document.createElement( 'canvas' );
187-
effect.appendChild( canvas );
185+
canvas.style.display = 'block';
186+
document.body.appendChild( canvas );
188187

189188
//
190189

@@ -607,7 +606,7 @@
607606
currentProgram = program;
608607

609608
compileButton.style.color = '#00ff00';
610-
compileButton.textContent = 'compiled succesfully';
609+
compileButton.textContent = 'compiled successfully';
611610

612611
set_save_button('visible');
613612

@@ -794,12 +793,14 @@
794793
indexEnd = error.indexOf(':', index);
795794
if (indexEnd > index) {
796795
lineNum = parseInt(error.substring(index, indexEnd));
797-
index = indexEnd + 1;
798-
indexEnd = error.indexOf("ERROR: 0:", index);
799-
lineError = htmlEncode((indexEnd > index) ? error.substring(index, indexEnd) : error.substring(index));
800-
line = code.setMarker(lineNum - 1, '<abbr title="' + lineError + '">' + lineNum + '</abbr>', "errorMarker");
801-
code.setLineClass(line, "errorLine");
802-
errorLines.push(line);
796+
if ((!isNaN(lineNum)) && (lineNum > 0)) {
797+
index = indexEnd + 1;
798+
indexEnd = error.indexOf("ERROR: 0:", index);
799+
lineError = htmlEncode((indexEnd > index) ? error.substring(index, indexEnd) : error.substring(index));
800+
line = code.setMarker(lineNum - 1, '<abbr title="' + lineError + '">' + lineNum + '</abbr>', "errorMarker");
801+
code.setLineClass(line, "errorLine");
802+
errorLines.push(line);
803+
}
803804
}
804805
}
805806

0 commit comments

Comments
 (0)