1function copyToClipboard(id){ 2 // Create a new textarea element and give it id='temp_element' 3 var textarea = document.createElement('textarea') 4 textarea.id = 'temp_element' 5 // Optional step to make less noise on the page, if any! 6 textarea.style.height = 0 7 // Now append it to your page somewhere, I chose <body> 8 document.body.appendChild(textarea) 9 // Give our textarea a value of whatever inside the div of id=containerid 10 textarea.value = document.getElementById(id).innerText 11 // Now copy whatever inside the textarea to clipboard 12 var selector = document.querySelector('#temp_element') 13 selector.select() 14 document.execCommand('copy') 15 swal("Copied!", "The Short Code has been copied to your clipboard", "success"); 16 // Remove the textarea 17 document.body.removeChild(textarea) 18 19 }
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.