aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/Service.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/Service.js')
-rw-r--r--src/models/Service.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/models/Service.js b/src/models/Service.js
index 848a84aa2..b48233237 100644
--- a/src/models/Service.js
+++ b/src/models/Service.js
@@ -2,7 +2,7 @@ import { computed, observable, autorun } from 'mobx';
2import path from 'path'; 2import path from 'path';
3import normalizeUrl from 'normalize-url'; 3import normalizeUrl from 'normalize-url';
4 4
5const debug = require('debug')('Franz:Service'); 5const debug = require('debug')('Ferdi:Service');
6 6
7export const RESTRICTION_TYPES = { 7export const RESTRICTION_TYPES = {
8 SERVICE_LIMIT: 0, 8 SERVICE_LIMIT: 0,
@@ -177,11 +177,15 @@ export default class Service {
177 } 177 }
178 178
179 @computed get userAgent() { 179 @computed get userAgent() {
180 let userAgent = window.navigator.userAgent; 180 let { userAgent } = window.navigator;
181 if (typeof this.recipe.overrideUserAgent === 'function') { 181 if (typeof this.recipe.overrideUserAgent === 'function') {
182 userAgent = this.recipe.overrideUserAgent(); 182 userAgent = this.recipe.overrideUserAgent();
183 } 183 }
184 184
185 // Remove Ferdi as it can cause incompatabilities with services.
186 // This way, Ferdi will look like a normal Chrome instance
187 userAgent = userAgent.replace(/(Ferdi|Electron)([^\s]+\s)/g, '');
188
185 return userAgent; 189 return userAgent;
186 } 190 }
187 191