--- import pkg from '../../../package.json'; import integrity from '../data/integrity.json'; const CDN_URL = `https://cdn.jsdelivr.net/npm/htmx.org@${pkg.version}/dist/htmx.min.js`; const INTEGRITY = integrity.min; --- ' writeText(tag) on navigator.clipboard add .icon-\\[radix-icons--check\\] to first in me remove .icon-\\[radix-icons--copy\\] from first in me set @title of me to 'Copied!' add @data-copied wait 2s add .icon-\\[radix-icons--copy\\] to first in me remove .icon-\\[radix-icons--check\\] from first in me set @title of me to 'Copy to clipboard' remove @data-copied end on copy(event) halt the event set url to my @data-cdn-url set integrity to my @data-integrity set tag to '' call event.clipboardData.setData('text/plain', tag)`} > <script src="…/htmx.min.js"></script>
<script src="…/htmx.min.js"></script>