/**
 * Adds a protocol to a valid URL. booger.io is a valid URL,
 * but if you try to create a new URL object with it, e.g.,
 * `new URL("booger.io"), you'll get a javascript exception. No bueno.
 * @param url
 */
export function addProtocolToValidURL(url) {
    if (url.includes("://"))
        return url;
    return `${location.protocol}//${url}`;
}
//# sourceMappingURL=addProtocolToValidURL.js.map