Example: Using jQuery DOM Events to Detect a Konami Code
People who grew up playing a lot of video games in the '80s and '90s will have fond memories of the Konami Code (see http://en.wikipedia.org/wiki/Konami_Code
). This cheat code was found in many games written by Konami, and usually gave the player “extra lives” or some other bonus to the game.
Several web sites, such as Facebook and Marvel Comics, have added this code in at various times in their history as April Fools' Day pranks or for other events, enabling some often silly feature until the next page refresh.
Implementing the Konami Code Easter egg using pure JavaScript can be pretty daunting, but with RxJS, it's fairly easy to detect the Konami Code pattern in the event stream using ...
Get Programming Reactive Extensions and LINQ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.