html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!-- Created by Burey -->
<html>
<head>
<script src="https://code.jquery.com/jquery-1.9.1.min.js" integrity="sha256-wS9gmOZBqsqWxgIVgA8Y9WcQOa7PgSIX+rPA0VL2rbQ=" crossorigin="anonymous"></script>
<!--
<script src="http://www.skulpt.org/static/skulpt.min.js" type="text/javascript"></script>
-->
<!--<script src="https://cdn.rawgit.com/skulpt/skulpt-dist/0.11.0/skulpt.min.js"></script>-->
<!--
<script src="http://www.skulpt.org/static/skulpt-stdlib.js" type="text/javascript"></script>-->
<!--<script src="https://cdn.rawgit.com/skulpt/skulpt-dist/0.11.0/skulpt-stdlib.js"></script>-->
<script src="https://rawcdn.githack.com/skulpt/skulpt-dist/30ef3d92aa4d45f22286effe445e4448a2d057d9/skulpt.js" type="text/javascript" module></script>
<script src="https://rawcdn.githack.com/skulpt/skulpt-dist/30ef3d92aa4d45f22286effe445e4448a2d057d9/skulpt-stdlib.js" type="text/javascript" module></script>
</head>
<body>
<h3>Powered by <a href="http://www.skulpt.org">Skulpt</a></3>
<h3>Created by <a href="https://www.sololearn.com/Profile/197327/?ref=app">Burey</a></h3>
<p>Write --> save --> run your own visual Python (Turtle module) codes by editing the <b>textarea</b> in the HTML tab!!!</p>
<!-- your python code goes inside the textarea -->
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* Created by Burey */
body {
display: flex;
flex-direction: column;
}
h3{
margin: 0;
text-align:center;
}
#yourcode {
display: none;
}
#mycanvas{
border: 1px solid black;
width: 99%;
}
#output{
}
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Created by Burey
// global value to save the last given input
var lastInput = "";
function clearOutput(){
// get references of input and output elements
var input = document.getElementById("input");
var output = document.getElementById("output");
var lastRow = null;
// if an input exist, save it + the last row text
if(input){
var len = output.innerHTML.split("<br>").length;
lastRow = output.innerHTML.split("<br>")[len-1].split("<")[0];
}
// reset the output
output.innerHTML = "";
// insert the last row + input to the output
if(input){
output.innerHTML = lastRow;
output.appendChild(input);
input.focus();
}
}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run