function replaceLegacyLinks() {
const links = document.querySelectorAll("a[href]");
links.forEach(link => {
try {
const url = new URL(link.href);
if (url.hostname === "account.shapr3d.com" || url.hostname === "collaborate.shapr3d.com") {
url.hostname = "app.shapr3d.com";
link.href = url.toString();
}
} catch (e) {
// no-op, just hide the console errors for invalid links
}
});
}
replaceLegacyLinks();