diondiondion 0e4878c733 [Glitch] Show collection preview cards and open collections links locally
Port 478dae0ab3420853d1d9ff2f6b3efcb85b322fd3 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2026-04-25 10:05:05 +02:00

15 lines
303 B
TypeScript

export function compareUrls(href1: string, href2: string) {
try {
const url1 = new URL(href1);
const url2 = new URL(href2);
return (
url1.origin === url2.origin &&
url1.pathname === url2.pathname &&
url1.search === url2.search
);
} catch {
return false;
}
}