Skip to content

Instantly share code, notes, and snippets.

@brtriver
Created December 25, 2013 10:30
Show Gist options
  • Save brtriver/8122016 to your computer and use it in GitHub Desktop.
Save brtriver/8122016 to your computer and use it in GitHub Desktop.
コンソールに打ち込んだらページの最初の画像をコナミコマンド打って最後にエンター押すと...
function okc (f) {
var c = [38,38,40,40,37,39,37,39,66,65,13],
x = function () {
x.c = x.c||Array.apply ({},c);
x.r = function () {
x.c = null
};
return x.c
},
h = function (e) {
if (x()[0] == (e||window.event).keyCode) {
x().shift();
if (!x().length) {
x.r ();
f ()
}
}
else {
x.r ()
}
};
window.addEventListener?window.addEventListener ('keydown',h,false):
document.attachEvent ('onkeydown',h)
}
okc (function() {
i = document.getElementsByTagName('img')[0];
i.src ='http://static.php.net/www.php.net/images/php_konami.gif';
});
@brtriver
Copy link
Author

php.netからコナミコマンドが消えてたのでググって見つけた記事にjsが書いてあったので。
via: http://phpmysql.jugem.jp/?eid=32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment