diff options
| author | Jieiku | 2023-02-10 17:48:28 -0800 |
|---|---|---|
| committer | Jieiku | 2023-02-10 17:48:28 -0800 |
| commit | 7e39d936aee880141fded9a7e5b1714efbe160e7 (patch) | |
| tree | 5d8f3e1ccb2c7d260dcb9f582ab7c6f852481415 /static/abridge-bundle-nosearch.min.js | |
| parent | 7207c18e0a5b751c4580c6a6ccb9f1f605974604 (diff) | |
| download | abridge-7e39d936aee880141fded9a7e5b1714efbe160e7.tar.gz abridge-7e39d936aee880141fded9a7e5b1714efbe160e7.tar.bz2 abridge-7e39d936aee880141fded9a7e5b1714efbe160e7.zip | |
Add more js Bundle options
Diffstat (limited to 'static/abridge-bundle-nosearch.min.js')
| -rw-r--r-- | static/abridge-bundle-nosearch.min.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/static/abridge-bundle-nosearch.min.js b/static/abridge-bundle-nosearch.min.js new file mode 100644 index 0000000..4b8865c --- /dev/null +++ b/static/abridge-bundle-nosearch.min.js @@ -0,0 +1 @@ +const items=document.querySelectorAll(".preStyle");items.forEach(e=>{e.rel="stylesheet"}),document.getElementById("mode").addEventListener("click",()=>{document.documentElement.classList.toggle("light"),localStorage.setItem("theme",document.documentElement.classList.contains("light")?"light":"dark")}),function(){for(var e=document.getElementsByClassName("m-protected"),t=0;t<e.length;t++){var n=e[t].getAttribute("href"),n=atob(n.substring(1));e[t].href="mailto:"+n}}(),function(){function t(e){const t=document.createElement("button");t.className="cc ",t.type="button",t.innerHTML="Copy",t.addEventListener("click",()=>async function(e,t){var n=t.querySelectorAll("table")["length"];let a="";0<n?t.querySelectorAll(":last-child > tr > td:last-child").forEach(e=>{a+=e.innerText}):a=t.querySelector(":last-child > code").innerText;try{"granted"==(result=await navigator.permissions.query({name:"clipboard-write"})).state||"prompt"==result.state?await navigator.clipboard.writeText(a):l(a,t)}catch(e){l(a,t)}finally{e.innerHTML="Copied",setTimeout(function(){e.innerHTML="Copy"},2e3)}}(t,e));var n=document.createElement("div");n.className="ccw",n.appendChild(t),e.parentNode.insertBefore(n,e),n.appendChild(e)}function l(e,t){var n=document.createElement("textArea"),e=(n.contentEditable="true",n.readOnly="false",n.className="copyable-text-area",n.value=e,t.insertBefore(n,t.firstChild),document.createRange()),a=(e.selectNodeContents(n),window.getSelection());a.removeAllRanges(),a.addRange(e),n.setSelectionRange(0,999999),document.execCommand("copy"),t.removeChild(n)}document.querySelectorAll("pre").forEach(e=>t(e))}();
\ No newline at end of file |
