tangled
alpha
login
or
join now
mackuba.eu
/
skythread
14
fork
atom
Thread viewer for Bluesky
14
fork
atom
overview
issues
pulls
pipelines
treat URLs other than http(s) as not valid
mackuba.eu
1 month ago
1cbd1abc
71e72fbf
+2
-2
1 changed file
expand all
collapse all
unified
split
src
utils.ts
+2
-2
src/utils.ts
···
17
17
18
18
export function isValidURL(url: string): boolean {
19
19
try {
20
20
-
new URL(url);
21
21
-
return true;
20
20
+
let u = new URL(url);
21
21
+
return (u.protocol == 'http:' || u.protocol == 'https:');
22
22
} catch (error) {
23
23
console.error("Invalid URL: " + error);
24
24
return false;