Re:Arc Ported to JavaScript
by albertcardona on Thursday February 07, 2008 @10:30AM
(#110958)
Super cool, thanks a lot! Now if only we could push return to enter instead of having to use the mouse ...
[ Parent
| on HN ]
Re:Arc Ported to JavaScript
by byrneseyeview on Thursday February 07, 2008 @10:59AM
(#110978)
Tab-return?
Re:Arc Ported to JavaScript
by nostrademons on Thursday February 07, 2008 @11:38AM
(#111007)
Yeah, that's what I do. I couldn't figure out how to get accesskeys to take "return" as the key. If anyone knows a better solution, I can change it.
Re:Arc Ported to JavaScript
by tlrobinson on Thursday February 07, 2008 @06:54PM
(#111600)
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);})();