Skip to content

Instantly share code, notes, and snippets.

Federico Brigante bfred-it

Block or report user

Report or block bfred-it

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bfred-it
bfred-it / header.js
Last active May 21, 2016 — forked from dominikwilkowski/header.js
Doc strange outline love (jQuery-free)
View header.js
//detecting tab key press
document.body.addEventListener('keydown', function detector (e) {
var keyCode = e.keyCode || e.which;
if(keyCode == 9) {
console.log( 'Tab detected' );
document.documentElement.className += ' is-keyboarduser';
document.body.removeEventListener('keydown', detector);
You can’t perform that action at this time.