mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
Enable titlebar fix
This commit is contained in:
parent
5bcbbacee1
commit
6c8eb71d46
1 changed files with 11 additions and 1 deletions
|
@ -4,7 +4,7 @@ import "./capturer";
|
|||
import "./patch";
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
import {injectHummusTitlebar, injectTitlebar} from "./titlebar";
|
||||
import {fixTitlebar, injectHummusTitlebar, injectTitlebar} from "./titlebar";
|
||||
import {sleep, addStyle, addScript} from "../utils";
|
||||
import {injectMobileStuff} from "./mobile";
|
||||
var version = ipcRenderer.sendSync("displayVersion");
|
||||
|
@ -61,6 +61,16 @@ if (window.location.href.indexOf("splash.html") > -1) {
|
|||
addScript(fs.readFileSync(path.join(__dirname, "../", "/content/js/rpc.js"), "utf8"));
|
||||
const cssPath = path.join(__dirname, "../", "/content/css/discord.css");
|
||||
addStyle(fs.readFileSync(cssPath, "utf8"));
|
||||
if (document.getElementById("window-controls-container") == null) {
|
||||
console.warn("Titlebar didn't inject, retrying...");
|
||||
if (ipcRenderer.sendSync("titlebar")) {
|
||||
if (channel == "hummus") {
|
||||
injectHummusTitlebar();
|
||||
} else {
|
||||
fixTitlebar();
|
||||
}
|
||||
}
|
||||
}
|
||||
await updateLang();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue