2021-12-24 21:56:49 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
2022-03-04 17:53:18 +00:00
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<title>ArmCord</title>
|
|
|
|
<style>
|
|
|
|
@import url("css/splash.css");
|
|
|
|
</style>
|
2022-07-04 14:39:22 +00:00
|
|
|
<script>
|
2022-07-05 16:34:53 +00:00
|
|
|
window.onbeforeunload = function () {
|
|
|
|
const style = document.createElement("style");
|
2022-07-04 14:39:22 +00:00
|
|
|
style.textContent = "body { display: none; }";
|
|
|
|
document.head.append(style);
|
|
|
|
};
|
|
|
|
</script>
|
2022-03-04 17:53:18 +00:00
|
|
|
</head>
|
2021-12-24 21:56:49 +00:00
|
|
|
|
2022-03-04 17:53:18 +00:00
|
|
|
<body>
|
|
|
|
<div class="container">
|
|
|
|
<video autoplay loop class="logo" id="splashscreen-armcord">
|
|
|
|
<source src="https://armcord.smartfridge.space/discord_loading.webm" type="video/webm" />
|
|
|
|
</video>
|
|
|
|
<p id="text-splashscreen"></p>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
<script>
|
2022-06-14 15:54:50 +00:00
|
|
|
async function loadLang() {
|
|
|
|
const text = document.getElementById("text-splashscreen");
|
|
|
|
if (window.navigator.onLine === false) {
|
|
|
|
text.innerHTML = await armcord.getLang("loading_screen_offline");
|
2022-04-22 20:09:35 +00:00
|
|
|
} else {
|
2022-06-14 15:54:50 +00:00
|
|
|
text.innerHTML = await armcord.getLang("loading_screen_start");
|
2022-07-05 16:34:53 +00:00
|
|
|
if (window.armcord.version === "3.1.0") {
|
2022-06-14 15:54:50 +00:00
|
|
|
console.log("Running a development build of ArmCord. Skipping updater.");
|
|
|
|
} else {
|
|
|
|
const response = await fetch("https://armcord.xyz/latest.json");
|
|
|
|
const data = await response.json();
|
|
|
|
if (data.version !== window.armcord.version) {
|
|
|
|
var elem = document.createElement("img");
|
|
|
|
elem.classList.add("logo");
|
|
|
|
elem.src = "https://armcord.smartfridge.space/update.webp";
|
|
|
|
document.body.prepend(elem);
|
|
|
|
document.getElementById("splashscreen-armcord").remove();
|
|
|
|
text.innerHTML = await armcord.getLang("loading_screen_update");
|
|
|
|
} else {
|
|
|
|
console.log("ArmCord is up to date.");
|
|
|
|
}
|
2022-03-04 17:53:18 +00:00
|
|
|
}
|
2022-06-14 15:54:50 +00:00
|
|
|
setTimeout(() => {
|
|
|
|
window.armcordinternal.splashEnd();
|
|
|
|
switch (window.armcord.channel) {
|
|
|
|
case "stable":
|
|
|
|
window.location.replace("https://discord.com/app");
|
|
|
|
break;
|
|
|
|
case "canary":
|
|
|
|
window.location.replace("https://canary.discord.com/app");
|
|
|
|
break;
|
|
|
|
case "ptb":
|
|
|
|
window.location.replace("https://ptb.discord.com/app");
|
|
|
|
break;
|
|
|
|
case "foss":
|
|
|
|
window.location.replace("https://dev.fosscord.com/app");
|
|
|
|
break;
|
|
|
|
case undefined:
|
|
|
|
window.location.replace("https://discord.com/app");
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
window.location.replace("https://discord.com/app");
|
|
|
|
}
|
|
|
|
}, 5000);
|
|
|
|
}
|
2022-03-04 17:53:18 +00:00
|
|
|
}
|
2022-06-14 15:54:50 +00:00
|
|
|
|
|
|
|
loadLang();
|
2022-03-04 17:53:18 +00:00
|
|
|
</script>
|
2021-12-24 21:56:49 +00:00
|
|
|
</html>
|