redlib/static/copy.js
Matthew Esposito 2e95e1fc6e
feat: smaller imports and exports (#373)
* feat: smaller imports and exports

* test(prefs): extend tests

* style(clippy)

* style: bubble up error

* style: update some wording
2025-02-06 20:34:12 -05:00

9 lines
No EOL
264 B
JavaScript

async function copy() {
await navigator.clipboard.writeText(document.getElementById('bincode_str').value);
}
async function set_listener() {
document.getElementById('copy').addEventListener('click', copy);
}
window.addEventListener('load', set_listener);