Last active
January 28, 2018 15:36
-
-
Save ohAitch/da2765f963a2ce6cea30c572cb2c2a9b to your computer and use it in GitHub Desktop.
"IDE"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<script src="https://code.jquery.com/jquery.js"></script> | |
<pre id="boot" contenteditable style="background:#eea">inp.onkeyup = inp.onfocus = () => { | |
var a | |
try{ a = eval(inp.innerText)} catch(_a){ a = _a} | |
res.innerText = a | |
}</pre> | |
<pre id="inp" contenteditable style="background:#bdb"> | |
localStorage.setItem("image", document.body.innerHTML) | |
1+1 | |
</pre> | |
<pre id="res">...</pre> | |
<script> | |
document.body.innerHTML = localStorage.getItem("image") || document.body.innerHTML | |
eval(boot.innerText) | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment