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 023103048..3ab6e2603 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,
@@ -180,11 +180,15 @@ export default class Service {
180 } 180 }
181 181
182 @computed get userAgent() { 182 @computed get userAgent() {
183 let userAgent = window.navigator.userAgent; 183 let { userAgent } = window.navigator;
184 if (typeof this.recipe.overrideUserAgent === 'function') { 184 if (typeof this.recipe.overrideUserAgent === 'function') {
185 userAgent = this.recipe.overrideUserAgent(); 185 userAgent = this.recipe.overrideUserAgent();
186 } 186 }
187 187
188 // Remove Ferdi as it can cause incompatabilities with services.
189 // This way, Ferdi will look like a normal Chrome instance
190 userAgent = userAgent.replace(/(Ferdi|Electron)([^\s]+\s)/g, '');
191
188 return userAgent; 192 return userAgent;
189 } 193 }
190 194