diff --git a/src/lib/components/Configuration.svelte b/src/lib/components/Configuration.svelte index 077ae9f..8418e77 100644 --- a/src/lib/components/Configuration.svelte +++ b/src/lib/components/Configuration.svelte @@ -141,6 +141,17 @@ }); }; + const pasteFromClipboard = async () => { + try { + url = await navigator.clipboard.readText(); + const inputElement = document.querySelector('input'); + inputElement.value = url; + } catch (err) { + console.error('Failed to read clipboard contents: ', err); + alert('Unable to access clipboard. Please paste the URL manually.'); + } + }; + /** * * @param {string} dataUrl @@ -171,9 +182,14 @@
e.key === 'Enter' && getVideoData(url, true)} /> +