Skip to content

Commit 97a551b

Browse files
committed
cleaned up generated URLs
1 parent af6d767 commit 97a551b

2 files changed

Lines changed: 3 additions & 12 deletions

File tree

‎v3/js/iframe-embed.js‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3434
// should all be imported BEFORE this file
3535

3636

37-
var myVisualizer = null; // singleton ExecutionVisualizer instance
38-
39-
4037
function NOP() {};
4138

4239

‎v3/js/opt-frontend.js‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -721,20 +721,16 @@ $(document).ready(function() {
721721

722722
$('#genUrlBtn').bind('click', function() {
723723
var myArgs = getAppState();
724-
if (appMode == 'display' || appMode == 'visualize' /* 'visualize' is deprecated */) {
725-
myArgs.curInstr = myVisualizer.curInstr;
726-
}
727-
724+
delete myArgs.visualizedAppState; // no need to put this in the URL
728725
var urlStr = $.param.fragment(window.location.href, myArgs, 2 /* clobber all */);
729726
$('#urlOutput').val(urlStr);
730727
});
731728

732-
733729
$('#genEmbedBtn').bind('click', function() {
734730
assert(appMode == 'display' || appMode == 'visualize' /* 'visualize' is deprecated */);
735731
var myArgs = getAppState();
736732
delete myArgs.mode;
737-
myArgs.curInstr = myVisualizer.curInstr;
733+
delete myArgs.visualizedAppState; // no need to put this in the URL
738734
myArgs.codeDivWidth = myVisualizer.DEFAULT_EMBEDDED_CODE_DIV_WIDTH;
739735
myArgs.codeDivHeight = myVisualizer.DEFAULT_EMBEDDED_CODE_DIV_HEIGHT;
740736

@@ -748,9 +744,7 @@ $(document).ready(function() {
748744
$('.surveyBtn').click(function(e) {
749745
// wow, massive copy-and-paste action from above!
750746
var myArgs = getAppState();
751-
if (appMode == 'display' || appMode == 'visualize' /* 'visualize' is deprecated */) {
752-
myArgs.curInstr = myVisualizer.curInstr;
753-
}
747+
delete myArgs.visualizedAppState; // no need to put this in the URL
754748

755749
var buttonPrompt = $(this).html();
756750
var res = prompt('"' + buttonPrompt + '"' + '\nPlease elaborate if you can and hit OK to submit:');

0 commit comments

Comments
 (0)