diff --git a/src/window.ts b/src/window.ts index dfd1d30..e80e5ad 100644 --- a/src/window.ts +++ b/src/window.ts @@ -172,6 +172,16 @@ async function doAfterDefiningTheWindow(): Promise { 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 themesFolder = `${userDataPath}/themes/`;