I made this for editing JS in middle school, since there wasn't any text editor or desktop.
data:text/html, <!-- JS Version 0.1 - Nov 2019 - GNU Public License v3.0 --> <html> <head> <title>JSedit</title> </head> <body style='margin:0px; width: 100%; height: 100%; background: grey;'> <div class='toolbar'> <div class='button' onclick='popup("about")'><b>JSedit</b></div> <div class='button' onclick='preview()'>Exec</div> <div class='button' onclick='exportCode()'>Export</div> </div> <textarea onkeydown="if(event.keyCode===9){var v=this.value,s=this.selectionStart,e=this.selectionEnd;this.value=v.substring(0, s)+'\t'+v.substring(e);this.selectionStart=this.selectionEnd=s+1;return false;}" id='code' class='code' placeholder='Enter text here...'></textarea> <style> .toolbar { width: 100%: height: 35px; background: grey; padding: 1.5px 1.5px;%20 position: absolute; top: 0px; left: 0px; } .button { float: left; margin-right: 2px;%20 border: 2px solid black; width:100px;%20 height:31px; font-size:15px;%20 background: grey; color: black; background: white; text-align: center;%20 font-family: sans-serif;%20 cursor: pointer;%20 user-select: none;%20 padding-top: 4px; box-sizing: border-box; } .button:active { background: lightgrey; } .code { position: absolute; bottom: 0px; left: 0px;%20 color:white; background-color:rgb(45, 49, 66); font-size:19px; border:none; width:100%; height:calc(100% - 35px); resize:none; outline:none; tab-size: 4px; -moz-tab-size: 4;} .popup { position: absolute; top: calc(50% - 200px); left: calc(50% - 200px); background: white; width: 400px; height: 400px; text-align: center; } </style> <script>%20 function setText(text) { document.getElementById("code").value = text; }%20 function preview() { window.open("javascript:try {" + document.getElementById("code").value + "} catch(e) {alert(e)}", "Hola",%20 "width=500, height=500" ); }%20 function exportCode() { prompt('Copy this as a bookmarklet', "javascript:setText(atob('" +btoa(document.getElementById("code").value) + "'))"); }%20 window.onbeforeunload = function() { return "If you leave this page, you will lose any unsaved changes.";%20 };%20 function popup(name) { var popup = document.createElement("DIV"); popup.className = "popup"; popup.innerHTML = ` <h1>JSedit</h1> <span>JSedit v0.1.0</span> <br> <span>View source at https://code.theres.life/PetabyteStudios/JSedit/raw/branch/master/bookmarklet</span> <br> <button onclick='this.parentElement.outerHTML = ""'>Close</button> `; document.body.appendChild(popup); } </script> </html>