3 ms·
document.getElementById("input").addEventListener("keypress", function(e) { e = e || window.event; if (e.keyCode == 13) { $('#eval')
by tlrobinson 19y ago
document.getElementById("input").addEventListener("keypress", function(e) {
e = e || window.event;
if (e.keyCode == 13) {
$('#eval').click();
e.target.value = "";
}}, false);
...or the equivalent in jQuery. Not IE compatible (no, I don't care)
In the meantime, here's a bookmarklet you can use to "patch" it:
javascript:(function(){document.getElementById("input").addEventListener("keypress", function(e) { e = e || window.event; if (e.keyCode == 13) { $('#eval').click(); e.target.value = ""; }}, false);})();