actually using identicon default across the site

This commit is contained in:
Julian Lam
2013-05-29 14:55:43 -04:00
parent 3848115afe
commit 9af39622ed
9 changed files with 26 additions and 14 deletions

View File

@@ -2,8 +2,13 @@
// Alternate Logins
var altLoginEl = document.querySelector('.alt-logins');
altLoginEl.addEventListener('click', function(e) {
if (e.target.nodeName === 'LI') {
document.location.href = e.target.getAttribute('data-url');
var target;
switch(e.target.nodeName) {
case 'LI': target = e.target; break;
case 'I': target = e.target.parentNode; break;
}
if (target) {
document.location.href = target.getAttribute('data-url');
}
});
}());