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="hide_paper" title="Hide the "print-out"">🚫 Hide output</button>
|
||||
|
||||
<input type="checkbox" id="autonum">Automatic-Numbering
|
||||
</form>
|
||||
|
||||
</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
|
||||
</ul>
|
||||
|
||||
<output style="font-family: monospace; font-size: small"></output>
|
||||
|
||||
<div id="paper-spacer"></div>
|
||||
<div id="paper"></div>
|
||||
|
||||
|
|
7
index.js
7
index.js
|
@ -114,7 +114,12 @@ window.addEventListener('DOMContentLoaded', function() {
|
|||
|
||||
try {
|
||||
var source = getSource()
|
||||
source = AutomaticNumbering(source)
|
||||
|
||||
$('output').innerText = ''
|
||||
if ($('#autonum').checked) {
|
||||
source = AutomaticNumbering(source)
|
||||
$('output').innerText = source
|
||||
}
|
||||
|
||||
program = basic.compile(source);
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in New Issue