mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
fix titlebar loading
This commit is contained in:
parent
c662b30ddc
commit
8545de1a9b
2 changed files with 6 additions and 6 deletions
|
@ -4,7 +4,7 @@
|
||||||
/* Hidden by default */
|
/* Hidden by default */
|
||||||
position: fixed;
|
position: fixed;
|
||||||
/* Stay in place */
|
/* Stay in place */
|
||||||
z-index: 9999999999999;
|
z-index: 9999;
|
||||||
/* Sit on top */
|
/* Sit on top */
|
||||||
padding-top: 100px;
|
padding-top: 100px;
|
||||||
/* Location of the box */
|
/* Location of the box */
|
||||||
|
|
|
@ -61,17 +61,17 @@ sleep(5000).then(async () => {
|
||||||
addScript(fs.readFileSync(path.join(__dirname, "../", "/content/js/rpc.js"), "utf8"));
|
addScript(fs.readFileSync(path.join(__dirname, "../", "/content/js/rpc.js"), "utf8"));
|
||||||
const cssPath = path.join(__dirname, "../", "/content/css/discord.css");
|
const cssPath = path.join(__dirname, "../", "/content/css/discord.css");
|
||||||
addStyle(fs.readFileSync(cssPath, "utf8"));
|
addStyle(fs.readFileSync(cssPath, "utf8"));
|
||||||
|
await updateLang();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Settings info version injection
|
||||||
|
setInterval(() => {
|
||||||
if (document.getElementById("window-controls-container") == null) {
|
if (document.getElementById("window-controls-container") == null) {
|
||||||
console.warn("Titlebar didn't inject, retrying...");
|
console.warn("Titlebar didn't inject, retrying...");
|
||||||
if (ipcRenderer.sendSync("titlebar")) {
|
if (ipcRenderer.sendSync("titlebar")) {
|
||||||
fixTitlebar();
|
fixTitlebar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await updateLang();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Settings info version injection
|
|
||||||
setInterval(() => {
|
|
||||||
addScript(`
|
addScript(`
|
||||||
if (document.getElementById("ACsettingsModal") == null) {
|
if (document.getElementById("ACsettingsModal") == null) {
|
||||||
var html = '<span class="close" id="closeSettings">×</span><div class="ACsettings-modal-content" id="webviewSettingsContainer"></div>';
|
var html = '<span class="close" id="closeSettings">×</span><div class="ACsettings-modal-content" id="webviewSettingsContainer"></div>';
|
||||||
|
|
Loading…
Reference in a new issue