Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(){
- var s = [38,38,40,40,37,39,37,39,66,65], p = 0, t = null, $w = $(window);
- var c = function(e){
- clearTimeout(t);
- if(p == s.length-1) {
- p = 0;
- $w.trigger('konami');
- } else if(e.keyCode == s[p]) {
- ++p;
- t = setTimeout(function(){ p = 0; }, 2000);
- } else {
- p = 0;
- }
- }
- $w.keyup(c);
- })();
Add Comment
Please, Sign In to add comment