Web Component (with Polymer) to listen the Konami Code (↑↑↓↓←→←→BA).
Example:
<konami-code></konami-code>
<p>Type the Konami Code to launch the easter egg.</p>
<script>
var konamiCode = document.querySelector('konami-code');
konamiCode.addEventListener('code-completed', function(event) {
alert('Easter egg!');
});
</script>
<!--
You also can use the Polymer annotated event listener setup:
<konami-code on-code-completed="_launchEasterEgg"></konami-code>
-->