1window.Clipboard = (function(window, document, navigator) { 2 var textArea, 3 copy; 4 5 function isOS() { 6 return navigator.userAgent.match(/ipad|iphone/i); 7 } 8 9 function createTextArea(text) { 10 textArea = document.createElement('textArea'); 11 textArea.value = text; 12 document.body.appendChild(textArea); 13 } 14 15 function selectText() { 16 var range, 17 selection; 18 19 if (isOS()) { 20 range = document.createRange(); 21 range.selectNodeContents(textArea); 22 selection = window.getSelection(); 23 selection.removeAllRanges(); 24 selection.addRange(range); 25 textArea.setSelectionRange(0, 999999); 26 } else { 27 textArea.select(); 28 } 29 } 30 31 function copyToClipboard() { 32 document.execCommand('copy'); 33 document.body.removeChild(textArea); 34 } 35 36 copy = function(text) { 37 createTextArea(text); 38 selectText(); 39 copyToClipboard(); 40 }; 41 42 return { 43 copy: copy 44 }; 45})(window, document, navigator);
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.