mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
Make the title more like in the official client (#404)
This commit is contained in:
parent
08209c2865
commit
52e5522f11
1 changed files with 10 additions and 0 deletions
|
@ -172,6 +172,16 @@ async function doAfterDefiningTheWindow(): Promise<void> {
|
||||||
mainWindow.setIcon(trayPath);
|
mainWindow.setIcon(trayPath);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mainWindow.webContents.on("page-title-updated", async (e, title) => {
|
||||||
|
const armCordSuffix = " - ArmCord"; /* identify */
|
||||||
|
if (!title.endsWith(armCordSuffix)) {
|
||||||
|
e.preventDefault();
|
||||||
|
await mainWindow.webContents.executeJavaScript(
|
||||||
|
`document.title = '${(title.split(" | ")[1] ?? title) + armCordSuffix}'`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
const userDataPath = app.getPath("userData");
|
const userDataPath = app.getPath("userData");
|
||||||
const themesFolder = `${userDataPath}/themes/`;
|
const themesFolder = `${userDataPath}/themes/`;
|
||||||
|
|
Loading…
Reference in a new issue