diff --git a/index.html b/index.html index b90ff61..f7b2c73 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@
-

Redirecting...

+

Redirecting...

SmartSheep is now known as Solsynth

We also updated our domain.

@@ -24,7 +24,7 @@

Please add our new domain to your browser favorites.

-
+

You are going to redirect to

https://solsynth.dev

in 5 seconds

diff --git a/src/main.ts b/src/main.ts index ab1b61b..7ba1600 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,10 +7,25 @@ import "@fontsource/roboto/latin.css" import { sitemap } from "./site" -const site = sitemap[location.host] ?? location.host.replace("smartsheep.studio", "solsynth.dev") -const url = location.protocol + "//" + site + location.pathname + location.search + location.hash +if (sitemap[location.host] !== false) { + const site = sitemap[location.host] ?? location.host.replace("smartsheep.studio", "solsynth.dev") + const url = location.protocol + "//" + site + location.pathname + location.search + location.hash -const target = document.querySelector("#redirect-target") -if (target) target.innerHTML = url + const target = document.querySelector("#redirect-target") + if (target) target.innerHTML = url -setTimeout(() => window.open(url, "_self"), 5000) \ No newline at end of file + setTimeout(() => window.open(url, "_self"), 5000) +} else { + const title = document.querySelector("#title") + if (title) { + title.classList.replace("text-2xl", "text-xl") + title.innerHTML = "Sorry, this service not available anymore..." + } + const info = document.querySelector("#redirect-info") + if (info) { + info.innerHTML = + "

We decided sunset this service for some reasons.

" + + "

More information please check out our official website.

" + + "

We're sorry, but this is the final decision.

" + } +} diff --git a/src/site.ts b/src/site.ts index e8da765..14b65a2 100644 --- a/src/site.ts +++ b/src/site.ts @@ -1,9 +1,13 @@ -export const sitemap: { [id: string]: string } = { - // Goatworks - "smartsheep.studio": "solsynth.dev", - "code.smartsheep.studio": "git.solsynth.dev", +export const sitemap: { [id: string]: string | boolean } = { + // Goatworks + "smartsheep.studio": "solsynth.dev", + "code.smartsheep.studio": "git.solsynth.dev", - // Hydrogen - "id.smartsheep.studio": "id.solsynth.dev", - "feed.smartsheep.studio": "co.solsynth.dev" + // Hydrogen + "id.smartsheep.studio": "id.solsynth.dev", + "feed.smartsheep.studio": "co.solsynth.dev", + + // Matrix + "matrix.smartsheep.studio": false, + "chat.smartsheep.studio": false }