fix titlebar loading

This commit is contained in:
smartfridge 2024-04-06 13:35:58 +02:00
parent c662b30ddc
commit 8545de1a9b
2 changed files with 6 additions and 6 deletions

View file

@ -4,7 +4,7 @@
/* Hidden by default */
position: fixed;
/* Stay in place */
z-index: 9999999999999;
z-index: 9999;
/* Sit on top */
padding-top: 100px;
/* Location of the box */

View file

@ -61,17 +61,17 @@ sleep(5000).then(async () => {
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"));
await updateLang();
});
// Settings info version injection
setInterval(() => {
if (document.getElementById("window-controls-container") == null) {
console.warn("Titlebar didn't inject, retrying...");
if (ipcRenderer.sendSync("titlebar")) {
fixTitlebar();
}
}
await updateLang();
});
// Settings info version injection
setInterval(() => {
addScript(`
if (document.getElementById("ACsettingsModal") == null) {
var html = '<span class="close" id="closeSettings">&times;</span><div class="ACsettings-modal-content" id="webviewSettingsContainer"></div>';