Open open-url-in-clipboard in Script Kit

Dead simple script for the very common use case of copying some text with a URL in it, and wanting to navigate to that URL. Will fetch the first one it finds and go

// Name: Open URL in clipboard
import "@johnlindquist/kit"
//get the clipboard
let text = await clipboard.readText();
//get the first URL in the clipboard, if any
let url = text.match(/(https?:\/\/[^\s]+)/);
//if there's a URL, open it
if (url) {
} else {
notify("No URL found in clipboard");