Sha256: 269258d3bf061d58cb930fb4755c200a19cfa98720602b9f25784eb9185c0593
Contents?: true
Size: 581 Bytes
Versions: 15
Compression:
Stored size: 581 Bytes
Contents
import { decodeEntities } from "@helpers/string"; export default function embedCodeDropdownComponent() { let copyTimeout = null; return { copied: false, copyEmbedCode() { this.$nextTick(async () => { const content = decodeEntities(this.$refs.copyTarget.innerHTML.trim()); await window.navigator.clipboard.writeText(content); this.copied = true; if (copyTimeout) { clearTimeout(copyTimeout); } copyTimeout = setTimeout(() => { this.copied = false; }, 2000); }); }, }; }
Version data entries
15 entries across 15 versions & 1 rubygems