(function () { [...document.querySelectorAll("pre.chroma code :not(.ln a)")] .forEach( (element) => { try { const text = element.textContent || ""; setTimeout( async () => { await navigator.clipboard.writeText(text); console.log("Info: Code block text copied succesfully."); }, 3000, ); } catch (err) { console.error( "Error: navigator.clipboard.writeText() failed.", err, ); } }, ); })();