feat: add custom window title option (#3656)

This commit is contained in:
Franz DC
2025-07-28 22:16:47 +08:00
committed by GitHub
parent b3b3d45b96
commit 20d25ca953
4 changed files with 52 additions and 4 deletions

View File

@ -599,6 +599,15 @@ app.once('browser-window-created', (_event, win) => {
win.webContents.on('will-prevent-unload', (event) => {
event.preventDefault();
});
const customWindowTitle = config.get('options.customWindowTitle');
if (customWindowTitle) {
win.on('page-title-updated', (event) => {
event.preventDefault();
win.setTitle(customWindowTitle);
});
}
});
app.on('window-all-closed', () => {