Skip to content
Snippets Groups Projects
Commit 5874e9a1 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

removed reset button which was useless

parent 67d34a0d
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -3,15 +3,10 @@ ...@@ -3,15 +3,10 @@
top: 0; top: 0;
right: 0; right: 0;
} }
.reset{
position: absolute;
top: 0;
left: 0;
}
.open-in-playground{ .open-in-playground{
position: absolute; position: absolute;
top: 0; top: 0;
left: 50px; left: 0;
} }
.return{ .return{
overflow-y: scroll; overflow-y: scroll;
......
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>'; var result = '<span class="return"></span>';
function addButtons() { function addButtons() {
...@@ -10,9 +10,6 @@ function addButtons() { ...@@ -10,9 +10,6 @@ function addButtons() {
$(block).before(buttons); $(block).before(buttons);
$(block).after(result); $(block).after(result);
}); });
$('.reset').each(function (n) {
$(this).context._code = $(this).siblings('code').text();
});
$('.exec').click(function () { $('.exec').click(function () {
var target = $(this).siblings('.return'); var target = $(this).siblings('.return');
target.html('<img src="figs/ferris_animated.gif" style="border:none; box-shadow:none; margin: 0; background: none;">'); target.html('<img src="figs/ferris_animated.gif" style="border:none; box-shadow:none; margin: 0; background: none;">');
...@@ -30,10 +27,6 @@ function addButtons() { ...@@ -30,10 +27,6 @@ function addButtons() {
target.html(output); target.html(output);
}); });
}); });
$('.reset').click(function () {
$(this).siblings('code').text($(this).context._code);
hljs.highlightBlock($(this).siblings('code')[0]);
})
$('.open-in-playground').click(function () { $('.open-in-playground').click(function () {
var code = $(this).siblings('code').text(); var code = $(this).siblings('code').text();
var baseUrl = 'https://play.rust-lang.org/?version=stable&code='; var baseUrl = 'https://play.rust-lang.org/?version=stable&code=';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment