Skip to content

Commit 2ebc8a7

Browse files
committed
added chris's experimental code links
1 parent 80b94cd commit 2ebc8a7

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

v3/js/opt-frontend.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,30 @@ $(document).ready(function() {
468468
return false;
469469
});
470470

471+
$('#cmFibLink').click(function() {
472+
$.get("example-code/chris-meyers/optFib.txt", setCodeMirrorVal);
473+
$("#showOnlyOutputsSelector").val('true');
474+
return false;
475+
});
476+
477+
$('#cmMinPathLink').click(function() {
478+
$.get("example-code/chris-meyers/optMinPath.txt", setCodeMirrorVal);
479+
$("#showOnlyOutputsSelector").val('true');
480+
return false;
481+
});
482+
483+
$('#cmKnapsackLink').click(function() {
484+
$.get("example-code/chris-meyers/optKnapsack.txt", setCodeMirrorVal);
485+
$("#showOnlyOutputsSelector").val('true');
486+
return false;
487+
});
488+
489+
$('#cmSieveLink').click(function() {
490+
$.get("example-code/chris-meyers/optSieve.txt", setCodeMirrorVal);
491+
$("#showOnlyOutputsSelector").val('true');
492+
return false;
493+
});
494+
471495

472496
var queryStrOptions = getQueryStringOptions();
473497

v3/visualize.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,18 @@
190190
<a id="nonlocalLink" href="#">nonlocal</a>
191191
</p>
192192

193+
<p style="margin-top: 15px;">
194+
<a href="https://github.com/pgbovine/OnlinePythonTutor/blob/master/v3/docs/html-rendering.md">HTML
195+
Rendering</a> (experimental code by <a href="http://www.openbookproject.net/py4fun">Chris Meyers</a>):<br/>
196+
[WARNING: will set toggle option from "show everything" to "show only outputs"]<br/>
197+
198+
<a id="cmFibLink" href="#">fib</a> |
199+
<a id="cmMinPathLink" href="#">minPath</a> |
200+
<a id="cmKnapsackLink" href="#">knapsack</a> |
201+
<a id="cmSieveLink" href="#">sieve</a>
202+
203+
</p>
204+
193205
</div>
194206

195207

0 commit comments

Comments
 (0)