From 8ebde3919704c3e1a9793b82f6ed22f486d966cb Mon Sep 17 00:00:00 2001 From: wukko Date: Tue, 16 Jul 2024 22:17:51 +0600 Subject: [PATCH] web/Omnibox: prevent paste button spamming --- web/src/components/save/Omnibox.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/src/components/save/Omnibox.svelte b/web/src/components/save/Omnibox.svelte index 3cd09beb..327aeea3 100644 --- a/web/src/components/save/Omnibox.svelte +++ b/web/src/components/save/Omnibox.svelte @@ -53,6 +53,10 @@ } const pasteClipboard = () => { + if (isDisabled || $dialogs.length > 0) { + return; + } + navigator.clipboard.readText().then(async (text) => { let matchLink = text.match(/https:\/\/[^\s]+/g); if (matchLink) {