mirror of
https://github.com/wukko/cobalt.git
synced 2025-04-30 14:34:27 +02:00
cobalt: use test instead of match in pasteClipboard
This commit is contained in:
parent
0ca393e8ec
commit
9b0d968cca
@ -493,7 +493,7 @@ const download = async(url) => {
|
||||
const pasteClipboard = async() => {
|
||||
try {
|
||||
let clipboard = await navigator.clipboard.readText();
|
||||
if (clipboard.match(/https?:\/\/[^\s]+/g)) {
|
||||
if (clipboard.test(/https?:\/\/[^\s]+/g)) {
|
||||
eid("url-input-area").value = text;
|
||||
download(eid("url-input-area").value);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user