diff --git a/css/console.css b/css/console.css index 6702e6fae60db0750c57fa5c96b2815f29d0b862..14f014aaac1caf2d6301fd787de6e385238b5423 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 e201220a59767b93c2b94377382b9c2817fad810..a40696ac309e8d95374c7cbe11a749fe6e55bfd3 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=';