2021-12-26 18:58:05 +00:00
|
|
|
import "./bridge";
|
2022-01-15 18:31:51 +00:00
|
|
|
import "./capturer";
|
2022-02-26 21:26:16 +00:00
|
|
|
import "./patch"
|
2022-01-15 18:31:51 +00:00
|
|
|
import * as fs from "fs";
|
|
|
|
import * as path from "path";
|
2021-12-26 18:58:05 +00:00
|
|
|
import { injectTitlebar } from "./titlebar";
|
2022-02-26 21:26:16 +00:00
|
|
|
import { sleep, addStyle, injectJS } from "../utils";
|
2021-12-26 21:41:09 +00:00
|
|
|
import { ipcRenderer } from "electron";
|
2022-02-26 21:26:16 +00:00
|
|
|
import { injectTabs } from "./tabs";
|
2022-01-30 19:48:32 +00:00
|
|
|
declare global {
|
|
|
|
interface Window {
|
|
|
|
armcord: any;
|
|
|
|
}
|
|
|
|
}
|
2021-12-26 21:41:09 +00:00
|
|
|
const clientMods = {
|
|
|
|
goosemod: "https://api.goosemod.com/inject.js",
|
|
|
|
cumcord:
|
|
|
|
"https://raw.githubusercontent.com/Cumcord/Cumcord/stable/dist/build.js",
|
|
|
|
flicker: "https://raw.githubusercontent.com/FlickerMod/dist/main/build.js",
|
|
|
|
};
|
2021-12-26 18:58:05 +00:00
|
|
|
|
|
|
|
console.log("ArmCord");
|
2021-12-26 21:41:09 +00:00
|
|
|
if (window.location.href.indexOf("splash.html") > -1) {
|
|
|
|
console.log("Skipping titlebar injection and client mod injection.");
|
|
|
|
} else {
|
2022-01-30 19:48:32 +00:00
|
|
|
if (ipcRenderer.sendSync("titlebar")) {
|
|
|
|
injectTitlebar();
|
|
|
|
}
|
2022-02-26 21:26:16 +00:00
|
|
|
if (ipcRenderer.sendSync("tabs")) {
|
|
|
|
injectTabs();
|
|
|
|
}
|
2022-01-15 18:31:51 +00:00
|
|
|
sleep(5000).then(() => {
|
|
|
|
const cssPath = path.join(__dirname, "../", "/content/css/discord.css");
|
|
|
|
addStyle(fs.readFileSync(cssPath, "utf8"));
|
|
|
|
|
|
|
|
switch (ipcRenderer.sendSync("clientmod")) {
|
|
|
|
case "goosemod":
|
|
|
|
injectJS(clientMods.goosemod);
|
|
|
|
console.log("Loading GooseMod...");
|
|
|
|
break;
|
|
|
|
case "cumcord":
|
|
|
|
injectJS(clientMods.cumcord);
|
|
|
|
console.log("Loading Cumcord...");
|
|
|
|
break;
|
|
|
|
case "flicker":
|
|
|
|
injectJS(clientMods.flicker);
|
|
|
|
console.log("Loading FlickerMod...");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
});
|
2021-12-26 21:41:09 +00:00
|
|
|
}
|