1function pwpcCopyLicense(btn) { 2 var key = btn.getAttribute('data-key'); 3 if (!key) return; 4 5 if (!navigator.clipboard) { 6 // Fallback 7 var textArea = document.createElement("textarea"); 8 textArea.value = key; 9 document.body.appendChild(textArea); 10 textArea.select(); 11 document.execCommand("Copy"); 12 textArea.remove(); 13 pwpcShowCopied(btn); 14 return; 15 } 16 navigator.clipboard.writeText(key).then(function() { 17 pwpcShowCopied(btn); 18 }, function(err) { 19 console.error('Could not copy text: ', err); 20 }); 21} 22 23function pwpcShowCopied(btn) { 24 var originalHtml = btn.innerHTML; 25 var textSpan = btn.querySelector('.pwpc-btn-text'); 26 27 btn.classList.add('copied'); 28 if(textSpan) textSpan.innerText = 'Copied!'; 29 30 setTimeout(function() { 31 btn.classList.remove('copied'); 32 btn.innerHTML = originalHtml; 33 }, 2000); 34}
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.