Skip to content

Instantly share code, notes, and snippets.

@jonjaques
Created August 2, 2013 19:08
Show Gist options
  • Save jonjaques/6142505 to your computer and use it in GitHub Desktop.
Save jonjaques/6142505 to your computer and use it in GitHub Desktop.
Dream Mode
<script>
(function($) {
var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65";
$(document).keydown(function(e) {
kkeys.push(e.keyCode);
if (kkeys.toString().indexOf(konami) >= 0) {
$(document).unbind('keydown', arguments.callee);
$.getScript('http://www.cornify.com/js/cornify.js', function() {
cornify_add();
$(document).keydown(cornify_add);
$('html').addClass('dream-mode');
});
}
});
})(jQuery);
</script>
<style>
.dream-mode {
-webkit-animation: dream_mode 4s linear 0s infinite alternate;
}
@-webkit-keyframes dream_mode {
0% { -webkit-filter: blur(0px) saturate(0) hue-rotate(0deg); }
33% { -webkit-filter: blur(5px) saturate(2) hue-rotate(120deg); }
50% { -webkit-filter: blur(0px) saturate(4) hue-rotate(180deg); }
67% { -webkit-filter: blur(5px) saturate(2) hue-rotate(240deg); }
100% { -webkit-filter: blur(0px) saturate(0) hue-rotate(360deg); }
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment