You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Put this code in the client controller of a widget to listen for the Konami Code. By default it just opens a modal notifying the user that the konami code as activated. Modify to do whatever fun things you want.
4
+
5
+
## Version 2
6
+
7
+
[KonamiCodeEasterEggV2.js]("Modern Development\Service Portal Widgets\Konami Code Easter Egg\KonamiCodeEasterEggV2.js") is the same code but improved with:
8
+
9
+
1. Uses e.key instead of e.keyCode (which is deprecated) with modern arrow key names
10
+
2. Automatically tracks only the last N keypresses instead of manual position tracking
11
+
3. Resets the sequence if the user pauses too long (more forgiving UX)
12
+
4. Removes event listener when widget is destroyed to prevent memory leaks
13
+
5. Uses array join comparison instead of position tracking
14
+
6. Modern variable declarations for better scoping
0 commit comments