diff options
Diffstat (limited to 'static/abridge-bundle-stork.min.js')
| -rw-r--r-- | static/abridge-bundle-stork.min.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/static/abridge-bundle-stork.min.js b/static/abridge-bundle-stork.min.js index 429a6db..ec2c45f 100644 --- a/static/abridge-bundle-stork.min.js +++ b/static/abridge-bundle-stork.min.js @@ -1 +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")});var baseUrl=document.querySelector("meta[name='base']").getAttribute("content"),sha256=("/"==baseUrl.slice(-1)&&(baseUrl=baseUrl.slice(0,-1)),"68af89cfa05d9c51e17c945e6618c3a4774d1fac04f5e7cb64cbad320434df6b"),sha384="Ajv5IIpSqbhU7cpXEKLoVY5X8Tgp5xoOE36zyqjRgK5uyw6d9X5b05K7l4pMsZG0";function loadSearchNow(){var e=document.createElement("script");e.src=baseUrl+"/search_bundle_stork.min.js?h="+sha256,e.setAttribute("integrity","sha384-"+sha384),e.setAttribute("type","module"),document.head.appendChild(e),document.getElementById("searchinput").onclick=""}window.onload=function(){document.getElementById("searchinput").onclick=function(){return loadSearchNow()}};for(var allElements=document.getElementsByClassName("m-protected"),i=0;i<allElements.length;i++)updateAnchor(allElements[i]);function updateAnchor(e){var t=e.getAttribute("title"),t=(e.title="Mail",atob(t).substring(7));e.href="mailto:"+t}function ccb(e){const t=document.createElement("button"),c=(t.className="cc ",t.type="button",t.innerHTML="Copy",t.addEventListener("click",()=>ccc(t,e)),document.createElement("div"));c.className="ccw",c.appendChild(t),e.parentNode.insertBefore(c,e),c.appendChild(e)}async function ccc(e,t){var c=t.querySelectorAll("table")["length"];let n="";if(0<c){const a=t.querySelectorAll(":last-child > tr > td:last-child");a.forEach(e=>{n+=e.innerText})}else n=t.querySelector(":last-child > code").innerText;try{"granted"==(result=await navigator.permissions.query({name:"clipboard-write"})).state||"prompt"==result.state?await navigator.clipboard.writeText(n):cce(n,t)}catch(e){cce(n,t)}finally{e.innerHTML="Copied",setTimeout(function(){e.innerHTML="Copy"},2e3)}}function cce(e,t){const c=document.createElement("textArea"),n=(c.contentEditable="true",c.readOnly="false",c.className="copyable-text-area",c.value=e,t.insertBefore(c,t.firstChild),document.createRange()),a=(n.selectNodeContents(c),window.getSelection());a.removeAllRanges(),a.addRange(n),c.setSelectionRange(0,999999),document.execCommand("copy"),t.removeChild(c)}document.querySelectorAll("pre").forEach(e=>ccb(e));
\ No newline at end of file +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")}),window.onload=function(){document.getElementById("searchinput").onclick=function(){var e=document.querySelector("meta[name='base']").getAttribute("content"),t=("/"==e.slice(-1)&&(e=e.slice(0,-1)),document.createElement("script"));t.src=e+"/search_bundle_stork.min.js?h=07a791ddc469ec9b7e93fa64a81899b6c12bb3143e8bd0d1aee0b6dacc885b7e",t.setAttribute("integrity","sha384-ePgzx2d0I+A6dkB+OTuOp13dsBEsL9f847ocaay/uDpwIyj0DUwOm7sEB01VpEiL"),t.setAttribute("type","module"),document.head.appendChild(t),document.getElementById("searchinput").onclick=""}},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"),n=(t.className="cc ",t.type="button",t.innerHTML="Copy",t.addEventListener("click",()=>async function(e,t){var n=t.querySelectorAll("table")["length"];let c="";if(0<n){const a=t.querySelectorAll(":last-child > tr > td:last-child");a.forEach(e=>{c+=e.innerText})}else c=t.querySelector(":last-child > code").innerText;try{"granted"==(result=await navigator.permissions.query({name:"clipboard-write"})).state||"prompt"==result.state?await navigator.clipboard.writeText(c):o(c,t)}catch(e){o(c,t)}finally{e.innerHTML="Copied",setTimeout(function(){e.innerHTML="Copy"},2e3)}}(t,e)),document.createElement("div"));n.className="ccw",n.appendChild(t),e.parentNode.insertBefore(n,e),n.appendChild(e)}function o(e,t){const n=document.createElement("textArea"),c=(n.contentEditable="true",n.readOnly="false",n.className="copyable-text-area",n.value=e,t.insertBefore(n,t.firstChild),document.createRange()),a=(c.selectNodeContents(n),window.getSelection());a.removeAllRanges(),a.addRange(c),n.setSelectionRange(0,999999),document.execCommand("copy"),t.removeChild(n)}document.querySelectorAll("pre").forEach(e=>t(e))}();
\ No newline at end of file |
