// Easter egg (404) var onKonamiCode = function (cb) { var key = '38384040373937396665'; var input = ''; document.addEventListener('keydown', function (e) { input += ('' + e.keyCode); if (input === key) return cb(); if (!key.indexOf(input)) return; input = ('' + e.keyCode); }); } onKonamiCode(function () { document.getElementById('body').style.background = 'url(static/img/backgrounds.3.png)'; document.getElementById('title').innerHTML = '200: FOUND'; document.getElementById('logo').src = 'static/img/easter_egg.png'; document.getElementById('logo').className = 'logo'; document.getElementById('content').innerHTML = [ '', 'It seems like you\'ve found an existing page!', '
', 'This is a secret konami easter egg', '
', 'You might\'ve found this page legitimately , if so well done!', '
', 'But if you lurked in the code and found this, you ruined the easter egg :(', '
', 'You just wasted your precious time reading this >:^)', '
', ].join('') }); // Easter egg (avatar) var hasWebP = (function() { var images = { basic: 'data:image/webp;base64,UklGRjIAAABXRUJQVlA4ICYAAACyAgCdASoCAAEALmk0mk0iIiIiIgBoSygABc6zbAAA/v56QAAAAA==', lossless: 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=' }; return function(feature) { var deferred = $.Deferred(); $('').on('load', function() { if(this.width === 2 && this.height === 1) deferred.resolve(); else deferred.reject(); }).on('error', function() { deferred.reject(); }).attr('src', images[feature || 'basic']); return deferred.promise(); } })(); hasWebP('lossless').then(function() { var v = Math.floor(Math.random() * 50); if (v >= 3 && v <= 4) { document.getElementById('logo').src = 'static/img/logos/' + v + '.webp'; document.getElementById('body').style.background = 'url(static/img/backgrounds/4.png)'; } if (v >= 5 && v <= 6) document.getElementById('logo').src = 'static/img/logos/' + v + '.webp'; }, function() { document.getElementById('logo').src = 'static/img/logos/2.gif'; });