From 5874e9a1a93119a9fdf2d761b672910f89495c5d Mon Sep 17 00:00:00 2001 From: Orestis Malaspinas <orestis.malaspinas@hesge.ch> Date: Fri, 22 Jun 2018 16:22:26 +0200 Subject: [PATCH] removed reset button which was useless --- css/console.css | 7 +------ js/playRust.js | 9 +-------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/css/console.css b/css/console.css index 6702e6f..14f014a 100644 --- a/css/console.css +++ b/css/console.css @@ -3,15 +3,10 @@ top: 0; right: 0; } -.reset{ - position: absolute; - top: 0; - left: 0; -} .open-in-playground{ position: absolute; top: 0; - left: 50px; + left: 0; } .return{ overflow-y: scroll; diff --git a/js/playRust.js b/js/playRust.js index e201220..a40696a 100644 --- a/js/playRust.js +++ b/js/playRust.js @@ -1,4 +1,4 @@ -var buttons = '<button class="exec btn">run</button><button class="reset btn">reset</button><button class="open-in-playground btn">open</button>' + "\n"; +var buttons = '<button class="exec btn">run</button><button class="open-in-playground btn">open</button>' + "\n"; var result = '<span class="return"></span>'; function addButtons() { @@ -10,9 +10,6 @@ function addButtons() { $(block).before(buttons); $(block).after(result); }); - $('.reset').each(function (n) { - $(this).context._code = $(this).siblings('code').text(); - }); $('.exec').click(function () { var target = $(this).siblings('.return'); target.html('<img src="figs/ferris_animated.gif" style="border:none; box-shadow:none; margin: 0; background: none;">'); @@ -30,10 +27,6 @@ function addButtons() { target.html(output); }); }); - $('.reset').click(function () { - $(this).siblings('code').text($(this).context._code); - hljs.highlightBlock($(this).siblings('code')[0]); - }) $('.open-in-playground').click(function () { var code = $(this).siblings('code').text(); var baseUrl = 'https://play.rust-lang.org/?version=stable&code='; -- GitLab