Better Loading Screen, Change to Canary, Change userAgent

This commit is contained in:
smartfridge 2021-05-02 18:34:43 +02:00
parent 99cfdc21a2
commit 42e2bc3c4d
2 changed files with 21 additions and 21 deletions

View file

@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta http-equiv="refresh" content="5; URL=https://discord.com/app" /> <meta http-equiv="refresh" content="5; URL=https://canary.discord.com/app" />
<title>ArmCord</title> <title>ArmCord</title>
<style> <style>
:root { :root {
@ -40,6 +40,16 @@
max-width: 204px; max-width: 204px;
} }
.centered {
position: fixed;
top: 50%;
left: 50%;
/* bring your own prefixes */
transform: translate(-50%, -50%);
max-height: 204px;
max-width: 204px;
}
</style> </style>
<style> <style>
body { body {
@ -49,20 +59,9 @@
</head> </head>
<body> <body>
<video autoplay loop class=center> <video autoplay loop class=centered>
<source src="https://discord.com/assets/0bdc0497eb3a19e66f2b1e3d5741634c.webm" type="video/webm"> <source src="https://discord.com/assets/0bdc0497eb3a19e66f2b1e3d5741634c.webm" type="video/webm">
</video> </video>
<h1>ArmCord</h1>
<h1>Discord will load in few seconds.</h1>
<script type=" text/javascript">
document.getElementById("myButton").onclick = function () {
location.href = "https://discordbotclient.jtmaveryk.repl.co";
};
</script>
</body> </body>
</html> </html>

17
main.js
View file

@ -12,13 +12,14 @@ function createWindow() {
height: 600, height: 600,
frame: false, frame: false,
webPreferences: { webPreferences: {
preload: path.join(__dirname, 'preload.js'), preload: path.join(__dirname, "preload.js"),
enableRemoteModule: true, enableRemoteModule: true,
nodeIntegration: false, nodeIntegration: false,
} },
}) });
mainWindow.webContents.userAgent =
mainWindow.loadFile('index.html') "Mozilla/5.0 (X12; TempleOS MIPS) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"; //to set
mainWindow.loadFile("index.html");
mainWindow.webContents.on("new-window", function (e, url) { mainWindow.webContents.on("new-window", function (e, url) {
e.preventDefault(); e.preventDefault();
require("electron").shell.openExternal(url); require("electron").shell.openExternal(url);
@ -26,9 +27,9 @@ function createWindow() {
// Open the DevTools. // Open the DevTools.
// mainWindow.webContents.openDevTools() // mainWindow.webContents.openDevTools()
mainWindow.on('closed', () => { mainWindow.on("closed", () => {
mainWindow = null mainWindow = null;
}) });
} }
// This method will be called when Electron has finished // This method will be called when Electron has finished