cobalt: use test instead of match in pasteClipboard

This commit is contained in:
wukko 2024-04-30 00:28:40 +06:00
parent 0ca393e8ec
commit 9b0d968cca
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -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);
}