From 9ec1e6ca6ac5196bdf5c43c147532051a1874468 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 1 Mar 2019 02:46:29 +0100 Subject: [PATCH] Konami code easter egg enables nyancat ;P --- src/js/yunohost/events.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/js/yunohost/events.js b/src/js/yunohost/events.js index 478edecc..2f4cd258 100644 --- a/src/js/yunohost/events.js +++ b/src/js/yunohost/events.js @@ -83,4 +83,22 @@ app.bind('logout', function(e, data) { $('#yunohost-version').empty(); }); + + + // Konamicode ;P up up down down left right left right b a + var konami_code = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65], + konami_step = 0; + $(document).keydown(function (e) { + if (e.keyCode === konami_code[konami_step++]) { + if (konami_step === konami_code.length) { + konami_step = 0; + $('#main').addClass("with-nyancat"); + return false; + } + } + else { + konami_step = 0; + } + }); + })();