[Web Player] Konami Code

Solved!
Reply

[Web Player] Konami Code

dr-evans
Newbie

Hi there!

 

I noticed you guys have the Konami Code hidden in you code: UP UP DOWN DOWN LEFT RIGHT LEFT RIGHT B A ENTER

 

 

 

var Konami = function () {
      'use strict';
      var _CODE = [
          38,
          38,
          40,
          40,
          37,
          39,
          37,
          39,
          66,
          65,
          13
        ], _CODE_LEN = _CODE.length, _listenerTarget = null, _onSuccess = null, next = 0, _keydown_listener = function (e) {
          if (e.keyCode === _CODE[next]) {
            next += 1;
            if (next === _CODE_LEN) {
              _onSuccess();
              next = 0;
            }
          } else {
            next = 0;
          }
        }, _addEventListeners = function () {
          if (_listenerTarget.addEventListener) {
            _listenerTarget.addEventListener('keydown', _keydown_listener, false);
          } else if (_listenerTarget.attachEvent) {
            _listenerTarget.attachEvent('onkeydown', _keydown_listener);
          } else {
            if (typeof _listenerTarget.onkeydown === 'function') {
              var preservedListenerTargetFunction = _listenerTarget.onkeydown;
              _listenerTarget.onkeydown = function (e) {
                preservedListenerTargetFunction(e);
                _keydown_listener(e);
              };
            } else {
              _listenerTarget.onkeydown = _keydown_listener;
            }
          }
        };
      return {
        onSuccess: function () {
        },
        listenerTarget: window,
        init: function () {
          _onSuccess = this.onSuccess;
          _listenerTarget = this.listenerTarget;
          _addEventListeners();
        }
      };
    };

Elsewhere I see that you import this module, initalize it, and define the onSuccess handler:

 

var weeegg = new konco();
weeegg.onSuccess = function () {
  miniPlayer = window.open('vendor/mini/mini.html', 'Spotify', windowFeatures);
};
weeegg.init();

 However, inputting the Konami Code in the browser does not cause something to happen. I have even tried to edit the JS to call miniPlayer = window.open(....) directly and it appears to do nothing. I was hoping to get more information on this little easter egg. 🙂

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Solution!

MauriceMV
Rock Star 7
Rock Star 7

I asked the mods and they said that they know that it doesnt really do anything at the moment but it probably will do something funny in the future. 

MauriceMVRock Star 7
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

View solution in original post

1 Reply
Solution!

MauriceMV
Rock Star 7
Rock Star 7

I asked the mods and they said that they know that it doesnt really do anything at the moment but it probably will do something funny in the future. 

MauriceMVRock Star 7
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

View solution in original post

SUGGESTED POSTS