mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-13 03:39:59 +00:00
cobalt: use test instead of match in pasteClipboard
This commit is contained in:
parent
0ca393e8ec
commit
9b0d968cca
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue