mirror of
https://github.com/inexorabletash/jsbasic.git
synced 2024-06-10 14:29:31 +00:00
Make auto-numbering optional (disabled by default)
This commit is contained in:
parent
dab25dc4a0
commit
cb1cf3fda4
|
@ -132,6 +132,8 @@ By <a target=_blank href="mailto:inexorabletash@gmail.com">Joshua Bell</a>
|
||||||
|
|
||||||
<button id="show_paper" title="Echo all output to a "print-out", so you can copy/paste">📃 Show output</button>
|
<button id="show_paper" title="Echo all output to a "print-out", so you can copy/paste">📃 Show output</button>
|
||||||
<button id="hide_paper" title="Hide the "print-out"">🚫 Hide output</button>
|
<button id="hide_paper" title="Hide the "print-out"">🚫 Hide output</button>
|
||||||
|
|
||||||
|
<input type="checkbox" id="autonum">Automatic-Numbering
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -154,6 +156,8 @@ By <a target=_blank href="mailto:inexorabletash@gmail.com">Joshua Bell</a>
|
||||||
<li><a target="_blank" href="http://www.quitebasic.com/">Quite BASIC</a> - a similar project aimed at teaching programming
|
<li><a target="_blank" href="http://www.quitebasic.com/">Quite BASIC</a> - a similar project aimed at teaching programming
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<output style="font-family: monospace; font-size: small"></output>
|
||||||
|
|
||||||
<div id="paper-spacer"></div>
|
<div id="paper-spacer"></div>
|
||||||
<div id="paper"></div>
|
<div id="paper"></div>
|
||||||
|
|
||||||
|
|
7
index.js
7
index.js
|
@ -114,7 +114,12 @@ window.addEventListener('DOMContentLoaded', function() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var source = getSource()
|
var source = getSource()
|
||||||
source = AutomaticNumbering(source)
|
|
||||||
|
$('output').innerText = ''
|
||||||
|
if ($('#autonum').checked) {
|
||||||
|
source = AutomaticNumbering(source)
|
||||||
|
$('output').innerText = source
|
||||||
|
}
|
||||||
|
|
||||||
program = basic.compile(source);
|
program = basic.compile(source);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user