1(function() { 2 jQuery(function($) { 3 try { 4 var konamiCallback = function() { 5 // Get the resto id (from php?) 6 var restoId = window.restaurantId, 7 restoIdCopyClipboard = $("<input type='text'>"); 8 9 restoIdCopyClipboard.val(restoId) 10 .appendTo("body") 11 .select(); 12 try{ 13 document.execCommand("copy"); 14 } catch(e) { 15 console.info("copy to clipboard does not seem to be permitted in your browser"); 16 } 17 restoIdCopyClipboard.remove(); 18 } 19 var kkeys = [], konami = "82,73,68,82,73,68"; 20 21 $(document).on("keydown", function(e){ 22 kkeys.push( e.keyCode ); 23 if (kkeys.length > 10) { 24 kkeys.shift(); 25 } 26 if ( kkeys.toString().indexOf( konami ) >= 0 ) { 27 konamiCallback(); 28 kkeys=[]; 29 } 30 }); 31 } catch(e) { 32 console.log('error loading copy clipboard code'); 33 } 34 }); 35})();
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.