Sha256: 5083adce18225d50e0664b45e237ea65f46cdd5d26f34a611dc6dcb30141608c
Contents?: true
Size: 776 Bytes
Versions: 4
Compression:
Stored size: 776 Bytes
Contents
(function() { var inputTextarea = document.querySelector('.js-input-ta'); var outputTextarea = document.querySelector('.js-output-ta'); var submitButton = document.querySelector('.js-submit-button'); inputTextarea.addEventListener('keydown', function(e) { if (e.keyCode === 9) { e.preventDefault(); e.target.value = e.target.value += " "; } }); var scssSubmit = submitButton.addEventListener('click', function() { var req = new XMLHttpRequest(); req.addEventListener("load", function(res) { if (req.status === 200) { outputTextarea.value = req.response; } else { alert('There was an issue on the server.'); } }); req.open("POST", "/beautify"); req.send(inputTextarea.value); }); })();
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
scss_beautifier-0.1.19 | web/public/main.js |
scss_beautifier-0.1.18 | web/public/main.js |
scss_beautifier-0.1.17 | web/public/main.js |
scss_beautifier-0.1.16 | web/public/main.js |