export class ElectronUserAgents { public static computeUserAgentFromWebContents ( webContents ) { return this . computeUserAgentFromString ( webContents . userAgent ) ; } public static computeUserAgentFromString ( userAgent ) { userAgent = userAgent . replace ( /Electron\/[0-9.]+ / , '' ) ; userAgent = userAgent . replace ( /polar-bookshelf\/[0-9.]+ / , '' ) ; return userAgent ; } }