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
961 stars 121 forks source link

Fix when importing as module #62

Closed georgemandis closed 2 months ago

georgemandis commented 2 months ago

Fixes issue #61 — Konami-JS doesn't play nicely when imported as a module in modern JavaScript!

The fix was quick—cleaning up my super-sloppy code from 2009 and don't pollute the global namespace with these variables (i.e. add var in front of them).