1jQuery(document).ready(function() { 2 var copy_text_label = '<i class="be be-clipboard"></i>'; 3 var copied_text_label = '<span class="dashicons dashicons-yes"></span>'; 4 var copyButton = '<div class="btn-clipboard bgt" title="Copy">' + copy_text_label + '</div>'; 5 jQuery('pre').each(function() { 6 jQuery(this).wrap('<div class="codebox"/>'); 7 }); 8 9 jQuery('div.codebox').prepend(jQuery(copyButton)).children('.btn-clipboard').show(); 10 var copyCode = new ClipboardJS('.btn-clipboard', { 11 target: function(trigger) { 12 return trigger.nextElementSibling; 13 } 14 }); 15 16 copyCode.on('success', 17 function(event) { 18 event.clearSelection(); 19 event.trigger.innerHTML = copied_text_label; 20 jQuery('.dashicons-yes').closest('.codebox').addClass('pre-loading'); 21 window.setTimeout(function() { 22 event.trigger.innerHTML = copy_text_label; 23 jQuery('.codebox').removeClass('pre-loading'); 24 }, 25 500); 26 }); 27 28 copyCode.on('error', 29 function(event) { 30 window.setTimeout(function() { 31 event.trigger.textContent = copy_text_label; 32 }, 33 2000); 34 }); 35 36});
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.