mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-29 11:06:10 +00: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…
Reference in a new issue