From 9b0d968ccaf7eecec7624e7291a898527241d14d Mon Sep 17 00:00:00 2001 From: wukko Date: Tue, 30 Apr 2024 00:28:40 +0600 Subject: [PATCH] cobalt: use test instead of match in pasteClipboard --- src/front/cobalt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/front/cobalt.js b/src/front/cobalt.js index 170e5c70..3a07dc88 100644 --- a/src/front/cobalt.js +++ b/src/front/cobalt.js @@ -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); }