georgemandis / konami-js

Adding the Konami Code easter egg to your projects since 2009! Compatible with gestures on smartphones and tablets as well. Compatible with all front-end frameworks and vanilla JavaScript
http://konamijs.mand.is/
MIT License
959 stars 121 forks source link

Fix to remove the history every time it does not match the pattern, even the first key. #2

Closed yosifkit closed 11 years ago

yosifkit commented 11 years ago

konami.js was acting like a limited keylogger.

georgemandis commented 11 years ago

I'm not sure I really see a problem with the way it's currently functioning by keeping the history. It's all on the client side and never exceeds the length of whatever the pattern is set to.

I tell you what though – do you think you could integrate this feature but decrease the overall file size? If you can do that I'd be a little more inclined to merge :smile: