Added channels (settings.json)

This commit is contained in:
KayoticCarnige 2021-05-28 12:00:30 -04:00
parent 253ff66cc3
commit adece2efc9
7 changed files with 48 additions and 3 deletions

View file

@ -3,8 +3,22 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta http-equiv="refresh" content="5; URL=https://discord.com/app" />
<title>ArmCord</title> <title>ArmCord</title>
<script>
window.onload = setTimeout(function() {
if (document.getElementById("ac-channel").innerHTML == "stable") {
window.location.href = "https://discord.com/app";
} else if (document.getElementById("ac-channel").innerHTML == "canary") {
window.location.href = "https://canary.discord.com/app";
} else if (document.getElementById("ac-channel").innerHTML == "ptb") {
window.location.href = "https://ptb.discord.com/app";
} else if (document.getElementById("ac-channel").innerHTML == "foss") {
window.location.href = "https://dev.fosscord.com/app";
} else {
window.location.href = "https://discord.com/app";
};
}, 3000);
</script>
<style> <style>
@import url("https://kckarnige.github.io/femboi_owo/discord-font.css"); @import url("https://kckarnige.github.io/femboi_owo/discord-font.css");
@ -71,6 +85,10 @@
color: #fff; color: #fff;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
#ac-channel {
display: none;
}
</style> </style>
<style> <style>
@ -84,6 +102,7 @@
</video> </video>
<p>Loading...</p> <p>Loading...</p>
<h1></h1> <h1></h1>
<p id="ac-channel"></p>
</div> </div>
</body> </body>

View file

@ -135,6 +135,10 @@ button#open-themes-btn:active {
width: 75%; width: 75%;
} }
#ac-channel {
display: none;
}
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 0.4em; width: 0.4em;
background: transparent; background: transparent;

View file

@ -7,9 +7,10 @@
</head> </head>
<body> <body>
<a href="https://discord.com/app"><button class="back-btn">Back to Discord</button></a> <button class="back-btn">Back to Discord</button>
<button id="open-themes-btn">Themes Folder</button> <button id="open-themes-btn">Themes Folder</button>
<p class="logo">Cord Manager</p> <p class="logo">Cord Manager</p>
<div id="tm-list"></div> <div id="tm-list"></div>
<p id="ac-channel"></p>
</body> </body>
</html> </html>

View file

@ -20,7 +20,7 @@ window.addEventListener("DOMContentLoaded", () => {
require("shell").openExternal("https://support.discord.com/"); require("shell").openExternal("https://support.discord.com/");
}); });
electronLocalshortcut.register(currentWindow, "F2", () => { electronLocalshortcut.register(currentWindow, "F2", () => {
window.location.href = "https://discord.com/invite/F25bc4RYDt"; window.location.href = "/invite/F25bc4RYDt";
}); });
electronLocalshortcut.register(currentWindow, "F4", () => { electronLocalshortcut.register(currentWindow, "F4", () => {
currentWindow.loadFile("./manager.html") currentWindow.loadFile("./manager.html")
@ -92,4 +92,7 @@ div.menubar[role="menubar"] {
text-transform: none; text-transform: none;
}` }`
); );
document.getElementById("ac-channel").innerHTML = ArmCord.Channel;
}); });

3
settings.json Normal file
View file

@ -0,0 +1,3 @@
{
"channel": "foss"
}

View file

@ -1,5 +1,7 @@
exports.Version = require("../package.json").version; exports.Version = require("../package.json").version;
exports.Channel = require("../settings.json").channel;
exports.addStyle = function(styleString) { exports.addStyle = function(styleString) {
const style = document.createElement('style'); const style = document.createElement('style');
style.textContent = styleString; style.textContent = styleString;

View file

@ -28,4 +28,17 @@ window.addEventListener("DOMContentLoaded", () => {
} }
}); });
document.getElementById("open-themes-btn").onclick = function () {shell.openPath(`${__dirname}/themes`);}; document.getElementById("open-themes-btn").onclick = function () {shell.openPath(`${__dirname}/themes`);};
document.getElementsByClassName("back-btn")[0].onclick = function () {
if (document.getElementById("ac-channel").innerHTML == "stable") {
window.location.href = "https://discord.com/app";
} else if (document.getElementById("ac-channel").innerHTML == "canary") {
window.location.href = "https://canary.discord.com/app";
} else if (document.getElementById("ac-channel").innerHTML == "ptb") {
window.location.href = "https://ptb.discord.com/app";
} else if (document.getElementById("ac-channel").innerHTML == "foss") {
window.location.href = "https://dev.fosscord.com/app";
} else {
window.location.href = "https://discord.com/app";
};
};
}); });