PageSourceSearch

https://www.thu.de/_assets/1b3912148daf116798541c5520df0353/fronte…/js/base/PermalinkController-BcyKLGPv.js

js thu.de collected 2026-10-02 06:21:54 UTC 1,327 bytes, 1 lines download raw bytes

1class c{constructor(){const o=document.querySelector("a[data-qr-code-download]"),t=document.querySelector(".thu-base64-copy");o?.addEventListener("click",this.download),t?.addEventListener("click",this.copy)}download(o){const t=document.querySelector(".permalink svg");if(!(t instanceof SVGElement))return;o.preventDefault();const a=new Blob([t.outerHTML],{type:"image/svg+xml"}),n=window.URL.createObjectURL(a),e=document.createElement("a");e.href=n,e.download="permalink.svg",document.body.appendChild(e),e.click(),document.body.removeChild(e),window.URL.revokeObjectURL(n)}copy(o){o.preventDefault();const t=o.target.closest(".thu-base64-copy");if(!t){console.error("Failed to copy permalink: no element with thu-base64-copy found");return}const a=t.getAttribute("data-base64");if(!a){console.error("Failed to copy permalink: data-base64 is empty");return}let n="";try{n=window.atob(a)}catch(e){console.error("Failed to copy permalink: invalid base64 in data-base64",e);return}navigator.clipboard.writeText(n).then(function(){const e=document.querySelector(".permalink [data-copy-notification]");e&&(e.classList.remove("opacity-0","pointer-events-none"),setTimeout(function(){e.classList.add("opacity-0","pointer-events-none")},3e3))}).catch(function(e){console.error("Failed to copy permalink:",e)})}}export{c as default};

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.