Merge pull request #1238 from sbenmoussati/SDA-3210

SDA-3201 Replacing user-agent to support Calls and snipping tool
This commit is contained in:
Johan Kwarnmark 2021-06-23 12:00:16 +02:00 committed by GitHub
commit 988b62f3da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2074,10 +2074,8 @@ export class WindowHandler {
const doOverrideUserAgents = !!this.globalConfig.overrideUserAgent;
let userAgent = mainWindow.webContents.getUserAgent();
if (doOverrideUserAgents) {
const electronUserAgentRegex = /(Electron[0-9\/.]*)/;
userAgent = userAgent
.replace(electronUserAgentRegex, '')
.replace(' ', ' ');
const electronUserAgentRegex = /Electron/;
userAgent = userAgent.replace(electronUserAgentRegex, 'ElectronSymphony');
}
return userAgent;
}