You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
923 B
2 lines
923 B
var e={};const t={start(){if(!window.Alpine)throw new Error("Alpine is required for `alpine-clipboard` to work.");Alpine.addMagicProperty("clipboard",()=>function(e){let t=e;if("string"!=typeof t)try{t=JSON.stringify(t)}catch(e){console.warn(e)}const n=document.createElement("textarea");if(n.value=t,n.setAttribute("readonly",""),n.style.cssText="position:fixed;pointer-events:none;z-index:-9999;opacity:0;",document.body.appendChild(n),navigator.userAgent&&navigator.userAgent.match(/ipad|ipod|iphone/i)){n.contentEditable=!0,n.readOnly=!0;const e=document.createRange();e.selectNodeContents(n);const t=window.getSelection();t.removeAllRanges(),t.addRange(e),n.setSelectionRange(0,999999)}else n.select();try{document.execCommand("copy")}catch(e){console.warn(err)}document.body.removeChild(n)})}},n=window.deferLoadingAlpine||(e=>e());window.deferLoadingAlpine=function(e){t.start(),n(e)},e=t;var o=e;export default o;
|
|
|