mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-29 21:10:14 +02:00
web/Omnibox: prevent paste button spamming
This commit is contained in:
parent
504dfdb995
commit
8ebde39197
@ -53,6 +53,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const pasteClipboard = () => {
|
const pasteClipboard = () => {
|
||||||
|
if (isDisabled || $dialogs.length > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
navigator.clipboard.readText().then(async (text) => {
|
navigator.clipboard.readText().then(async (text) => {
|
||||||
let matchLink = text.match(/https:\/\/[^\s]+/g);
|
let matchLink = text.match(/https:\/\/[^\s]+/g);
|
||||||
if (matchLink) {
|
if (matchLink) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user