mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
Update to E28
This commit is contained in:
parent
f678b7fd42
commit
6beee8d825
4 changed files with 35 additions and 24 deletions
27
src/splash/redirect.html
Normal file
27
src/splash/redirect.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Loading</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Loading Discord</h1>
|
||||
<script>
|
||||
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 undefined:
|
||||
window.location.replace("https://discord.com/app");
|
||||
break;
|
||||
default:
|
||||
window.location.replace("https://discord.com/app");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -274,25 +274,9 @@ async function doAfterDefiningTheWindow(): Promise<void> {
|
|||
if (firstRun) {
|
||||
mainWindow.close();
|
||||
}
|
||||
mainWindow.loadURL("data:text/html,%3Ch1%3ELoading%21%3C%2Fh1%3E");
|
||||
mainWindow.webContents.executeJavaScript(`
|
||||
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 undefined:
|
||||
window.location.replace("https://discord.com/app");
|
||||
break;
|
||||
default:
|
||||
window.location.replace("https://discord.com/app");
|
||||
}
|
||||
`);
|
||||
//loadURL broke for no good reason after E28
|
||||
mainWindow.loadFile("splash/redirect.html");
|
||||
|
||||
if (await getConfig("skipSplash")) {
|
||||
mainWindow.show();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue