Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- doabarrelroll = function()
- {
- if (typeof(barrelrolls)=='undefined')
- barrelrolls = 0;
- barrelrolls++;
- var head = document.getElementsByTagName('head')[0];
- var style = document.createElement('style');
- var declarations = document.createTextNode('body { transform:rotate('+degBarrelRoll*barrelrolls+'deg); -ms-transform:rotate('+degBarrelRoll*barrelrolls+'deg); -moz-transform:rotate('+degBarrelRoll*barrelrolls+'deg); -webkit-transform:rotate('+degBarrelRoll*barrelrolls+'deg); -o-transform:rotate('+degBarrelRoll*barrelrolls+'deg); transition: '+secBarrellRoll+'s; -moz-transition: '+secBarrellRoll+'s; -webkit-transition: '+secBarrellRoll+'s; -o-transition: '+secBarrellRoll+'s; }');
- style.type = 'text/css';
- if (style.styleSheet)
- style.styleSheet.cssText = declarations.nodeValue;
- else
- style.appendChild(declarations);
- head.appendChild(style);
- }
- var kKeys = '';
- $(document).keydown(function(e)
- {
- kKeys = (kKeys+e.keyCode+',').slice(-30);
- if (kKeys.indexOf('38,38,40,40,37,39,37,39,66,65')>-1)
- {
- doabarrelroll();
- kKeys = '';
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement