Created
August 28, 2013 23:08
-
-
Save derekpeterson/6372523 to your computer and use it in GitHub Desktop.
The Vogue.co.uk raptor Easter egg, which starts at line 1075 here: http://d3u12z27ui3vom.cloudfront.net/Build-Vogue-master/2055-fcce9c6e0c61/logic/site.v2.group.generated.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// konami code - up up down down left right left right b a | |
var code1 = String.fromCharCode(38, 38, 40, 40, 37, 39, 37, 39, 66, 65); | |
var code2 = String.fromCharCode(38, 38, 40, 40, 37, 39, 37, 39, 65, 66); | |
var codeBuffer = ""; | |
$(document).keyup(function (e) { | |
codeBuffer += String.fromCharCode(e.which); | |
if (code1.substring(0, codeBuffer.length) == codeBuffer) { | |
if (code1.length == codeBuffer.length) { | |
toggle1(); | |
codeBuffer = String.fromCharCode(38, 38, 40, 40, 37, 39, 37, 39, 66); | |
} | |
} else if (code2.substring(0, codeBuffer.length) == codeBuffer) { | |
if (code2.length == codeBuffer.length) { | |
toggle2(); | |
codeBuffer = ""; | |
} | |
} else { | |
codeBuffer = ""; | |
} | |
}); | |
function toggle1() { | |
if ($("body").raptorize) { | |
$("body").raptorize(); | |
} else { | |
$("head").append('<script src="/_/logic/jquery.raptorize.1.0.js?'+Math.random()+'"></script>'); | |
} | |
} | |
function toggle2() { | |
window.DEBUG_FLAG = !window.DEBUG_FLAG; | |
window.DEBUG_FILTER_INCLUDE = null; | |
window.DEBUG_FILTER_EXCLUDE = null; | |
window.logInited=true; | |
updateConsoleVisibility(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment