1(function($) { 2 3 //KONAMI CODE 4 var allowedKeys = { 5 37: 'left', 6 38: 'up', 7 39: 'right', 8 40: 'down', 9 65: 'a', 10 66: 'b' 11 }; 12 var konamiCode = ['up', 'up', 'down', 'down', 'left', 'right', 'left', 'right', 'b', 'a']; 13 var konamiCodePosition = 0; 14 document.addEventListener('keydown', function(e) { 15 var key = allowedKeys[e.keyCode]; 16 var requiredKey = konamiCode[konamiCodePosition]; 17 if (key == requiredKey) { 18 konamiCodePosition++; 19 if (konamiCodePosition == konamiCode.length) 20 activateCheats(); 21 } else { 22 konamiCodePosition = 0; 23 } 24 }); 25})(jQuery); 26 27$(document).on('onInit.fb', function(e, instance) { 28 if ($('.fancybox-toolbar').find('#rotate_button').length === 0) { 29 $('.fancybox-toolbar').prepend('<button id="rotate_button" class="fancybox-button" title="Rotate Image"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M11.074,9.967a4.43,4.43,0,1,1-4.43-4.43V8.859l5.537-4.43L6.644,0V3.322a6.644,6.644,0,1,0,6.644,6.644Z" transform="translate(10.305 1) rotate(30)"/></svg></button>'); 30 } 31 var click = 0; 32 $('.fancybox-toolbar').on('click', '#rotate_button', function() { 33 var n = 90 * ++click; 34 $('.fancybox-content img').css('webkitTransform', 'rotate(+' + n + 'deg)'); 35 $('.fancybox-content img').css('mozTransform', 'rotate(+' + n + 'deg)'); 36 }); 37});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.