1document.getElementById('copy-link').addEventListener("click", copyUrl); 2 3function copyUrl(){ 4 var inputBox = document.getElementById('page-url'); 5 if (inputBox.classList.contains("hide")){ 6 inputBox.classList.remove("hide"); 7 } 8 inputBox.select(); 9 document.execCommand('copy'); 10 inputBox.classList.add("hide"); 11} 12 13// on load, populate the href of the three anchor links with the full URL 14// so that the links work even if site.url is not configured 15 16const fullUrl = window.location.href; 17const fullUrlEncoded = encodeURIComponent(window.location.href); 18const titleEncoded = encodeURIComponent(document.getElementsByTagName("title")[0].innerHTML); 19 20document.getElementById("mail-anchor").setAttribute("href", "mailto:?Subject=" + titleEncoded + "&Body=" + fullUrlEncoded); 21document.getElementById("fb-anchor").setAttribute("href", "http://www.facebook.com/sharer.php?u=" + fullUrlEncoded); 22document.getElementById("li-anchor").setAttribute("href", "https://www.linkedin.com/sharing/share-offsite/?url=" + fullUrlEncoded + "&title=" + titleEncoded); 23document.getElementById("page-url").setAttribute("value", fullUrl);
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.