1function addLink() { 2 var body_element = document.getElementsByTagName('body')[0]; 3 var selection = document.getSelection(); 4 var pagelink = "<p>" + text + " <a href='"+document.location.href+"'>"+document.location.href+"</a></p>"; 5 var copytext = selection + pagelink; 6 var newdiv = document.createElement('div'); 7 body_element.appendChild(newdiv); 8 newdiv.innerHTML = copytext; 9 selection.selectAllChildren(newdiv); 10 window.setTimeout( function() { 11 body_element.removeChild(newdiv); 12 }, 0); 13} 14document.oncopy = addLink;
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.