Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 59e7cf837eed41f4c49f4218c3822103b5c80238 1 parent 6db31b9
Brian Klug authored

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. +5 0 templates/main.html
5 templates/main.html
@@ -6,7 +6,12 @@
6 6 function stopRKey(evt) {
7 7 var evt = (evt) ? evt : ((event) ? event : null);
8 8 var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
  9 + var em = document.getElementById("em").value;
9 10 if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
  11 +
  12 + if (evt.keyCode==9 && em.length>0 && em.indexOf("@")==-1) {
  13 + document.getElementById("em").value = em+"@hackerdojo.com";
  14 + }
10 15 if (evt.keyCode==45 || evt.keyCode==18) {
11 16 showStaffButtons();
12 17 }

0 comments on commit 59e7cf8

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