From b2f08a73a3fd71968aefca0f3e5fdee7f545f4d0 Mon Sep 17 00:00:00 2001 From: Daniel Smith <1657182+StormPooper@users.noreply.github.com> Date: Fri, 2 Oct 2020 14:50:35 +0100 Subject: Update user agent for OWA and Outlook (#302) --- recipes/office365-owa/index.js | 9 ++++++++- recipes/outlook/index.js | 10 +++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'recipes') diff --git a/recipes/office365-owa/index.js b/recipes/office365-owa/index.js index 9157a2e..ce5229a 100644 --- a/recipes/office365-owa/index.js +++ b/recipes/office365-owa/index.js @@ -1 +1,8 @@ -module.exports = Franz => Franz; \ No newline at end of file +var os = require('os') + +module.exports = Franz => + class Owa extends Franz { + overrideUserAgent() { + return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g,"").trim(); + } + }; diff --git a/recipes/outlook/index.js b/recipes/outlook/index.js index 2df4f0b..5d96b3e 100644 --- a/recipes/outlook/index.js +++ b/recipes/outlook/index.js @@ -1,4 +1,8 @@ -"use strict"; +var os = require('os') -module.exports = Franz => Franz; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9mZmljZTM2NS1vd2EvaW5kZXguanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIkZyYW56Il0sIm1hcHBpbmdzIjoiOztBQUFBLE9BQU8sQUFBUCxVQUFpQixTQUFTLEFBQTFCIiwiZmlsZSI6Im9mZmljZTM2NS1vd2EvaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IEZyYW56ID0+IEZyYW56OyJdfQ== \ No newline at end of file +module.exports = Franz => + class Outlook extends Franz { + overrideUserAgent() { + return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g,"").trim(); + } + }; -- cgit v1.2.3-70-g09d2