mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
i have no idea what i am doing
This commit is contained in:
parent
41306d6cde
commit
8d3b5f523a
4 changed files with 121 additions and 74 deletions
|
@ -23,7 +23,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||
window.location.href = "https://discord.com/invite/F25bc4RYDt";
|
||||
});
|
||||
electronLocalshortcut.register(currentWindow, "F3", () => {
|
||||
window.location.href = "./theme.html";
|
||||
window.location.href = __dirname + "/theme.html";
|
||||
});
|
||||
require("./utils/capturer.js");
|
||||
|
||||
|
|
122
theme.html
122
theme.html
|
@ -1,75 +1,71 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>ArmCord Theme Manager</title>
|
||||
<style>
|
||||
@import url("https://kckarnige.github.io/femboi_owo/discord-font.css");
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>ArmCord Theme Manager</title>
|
||||
<style>
|
||||
@import url("https://kckarnige.github.io/femboi_owo/discord-font.css");
|
||||
:root {
|
||||
background-color: #2c2f33;
|
||||
--header-secondary: #b9bbbe;
|
||||
--header-primary: #fff;
|
||||
--background-tertiary: #202225;
|
||||
}
|
||||
|
||||
:root {
|
||||
background-color: #2c2f33;
|
||||
--header-secondary: #b9bbbe;
|
||||
--header-primary: #fff;
|
||||
--background-tertiary: #202225;
|
||||
}
|
||||
body {
|
||||
color: white;
|
||||
}
|
||||
|
||||
body {
|
||||
color: white;
|
||||
}
|
||||
p {
|
||||
color: white;
|
||||
}
|
||||
|
||||
p {
|
||||
color: white;
|
||||
}
|
||||
h1 {
|
||||
font-size: 0px;
|
||||
text-align: center;
|
||||
transform: translateY(-105%);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 0px;
|
||||
text-align: center;
|
||||
transform: translateY(-105%);
|
||||
}
|
||||
h1:before {
|
||||
content: "ARM";
|
||||
color: #7289da;
|
||||
font-weight: normal;
|
||||
font-family: Helvetica, sans-serif;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
h1:before {
|
||||
content: "ARM";
|
||||
color: #7289da;
|
||||
font-weight: normal;
|
||||
font-family: Helvetica, sans-serif;
|
||||
font-size: 32px;
|
||||
}
|
||||
h1:after {
|
||||
content: "Cord";
|
||||
color: #ffffff;
|
||||
font-weight: normal;
|
||||
font-family: Discordinated;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
h1:after {
|
||||
content: "Cord";
|
||||
color: #ffffff;
|
||||
font-weight: normal;
|
||||
font-family: Discordinated;
|
||||
font-size: 32px;
|
||||
}
|
||||
span {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
span {
|
||||
text-align: center;
|
||||
}
|
||||
.logo {
|
||||
color: #ffffff;
|
||||
font-weight: normal;
|
||||
font-family: Discordinated;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
max-height: 204px;
|
||||
max-width: 204px;
|
||||
transform: translateY(5%);
|
||||
}
|
||||
.container {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
color: #fff;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
.container {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
color: #fff;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<body>
|
||||
<p class="logo">Theme Manager</p>
|
||||
<div id="tm-list"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,14 +1,57 @@
|
|||
const themeFolder = __dirname + "/themes/";
|
||||
const fs = require("fs");
|
||||
const armcord = require("./armcord.js")
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
fs.readdirSync(themeFolder).forEach((file) => {
|
||||
console.log(file);
|
||||
try {
|
||||
const style = fs.readFileSync(`${__dirname}/themes/${file}`, "utf8");
|
||||
armcord.addStyle(style)
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
const armcord = require("./armcord.js");
|
||||
const splitRegex = /[^\S\r\n]*?\r?(?:\r\n|\n)[^\S\r\n]*?\*[^\S\r\n]?/;
|
||||
const escapedAtRegex = /^\\@/;
|
||||
function parseMeta(fileContent) {
|
||||
//https://github.com/rauenzi/BetterDiscordApp/blob/01941c1178c13e1229e39e1f1434678a39a020b8/renderer/src/modules/addonmanager.js
|
||||
const block = fileContent.split("/**", 2)[1].split("*/", 1)[0];
|
||||
const out = {};
|
||||
let field = "";
|
||||
let accum = "";
|
||||
for (const line of block.split(splitRegex)) {
|
||||
if (line.length === 0) continue;
|
||||
if (line.charAt(0) === "@" && line.charAt(1) !== " ") {
|
||||
out[field] = accum;
|
||||
const l = line.indexOf(" ");
|
||||
field = line.substr(1, l - 1);
|
||||
accum = line.substr(l + 1);
|
||||
} else {
|
||||
accum += " " + line.replace("\\n", "\n").replace(escapedAtRegex, "@");
|
||||
}
|
||||
}
|
||||
out[field] = accum.trim();
|
||||
delete out[""];
|
||||
out.format = "jsdoc";
|
||||
return out;
|
||||
}
|
||||
function loadPluginMenu() {
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
fs.readdirSync(themeFolder).forEach((file) => {
|
||||
console.log(file);
|
||||
try {
|
||||
const style = fs.readFileSync(`${__dirname}/themes/${file}`, "utf8");
|
||||
document.getElementById("tm-list").appendChild(
|
||||
`
|
||||
<p>${parseMeta(style)}</p>
|
||||
`
|
||||
);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
loadPluginMenu()
|
||||
fs.readdirSync(themeFolder).forEach((file) => {
|
||||
console.log(file);
|
||||
try {
|
||||
const style = fs.readFileSync(`${__dirname}/themes/${file}`, "utf8");
|
||||
armcord.addStyle(style);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
/**
|
||||
* @name Revert Rebrand
|
||||
* @author GooseNest
|
||||
* @description Reverts Discord's 2021 rebrand (font, colors, reactions, mentions, loading screen, home icon, reply ping color, and more)
|
||||
* @invite neMncS2
|
||||
* @version 3.0
|
||||
*/
|
||||
|
||||
@import url('https://Goose-Nest.github.io/GT-RevertRebrand/src/main.css');
|
Loading…
Reference in a new issue