Skip to content
Browse files

Add 'tab' key shortcut - iff e-mail doesn't contain @

  • Loading branch information...
1 parent 6db31b9 commit 59e7cf837eed41f4c49f4218c3822103b5c80238 Brian Klug committed Nov 27, 2009
Showing with 5 additions and 0 deletions.
  1. +5 −0 templates/main.html
View
5 templates/main.html
@@ -6,7 +6,12 @@
function stopRKey(evt) {
var evt = (evt) ? evt : ((event) ? event : null);
var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
+ var em = document.getElementById("em").value;
if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
+
+ if (evt.keyCode==9 && em.length>0 && em.indexOf("@")==-1) {
+ document.getElementById("em").value = em+"@hackerdojo.com";
+ }
if (evt.keyCode==45 || evt.keyCode==18) {
showStaffButtons();
}

0 comments on commit 59e7cf8

Please sign in to comment.
Something went wrong with that request. Please try again.