From 143583b74f69bb69ccddb6cb2fa7ae744bc76e72 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Wed, 1 Apr 2020 08:34:45 +0200 Subject: Don't set Mac UA on Linux for Google services If we set the Mac UA on Linux, then various shortcuts will change to Mac ones - i.e. Ctrl + K to create a link in GMail will stop work, Ctrl + Enter to send an email in GMail and others. Only set the Mac UA when not running on Linux. --- uncompressed/hangouts/index.js | 7 ++++++- uncompressed/hangouts/package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'uncompressed/hangouts') diff --git a/uncompressed/hangouts/index.js b/uncompressed/hangouts/index.js index d876475..a671025 100644 --- a/uncompressed/hangouts/index.js +++ b/uncompressed/hangouts/index.js @@ -1,6 +1,11 @@ +var os = require('os') + module.exports = Franz => class hangouts extends Franz { overrideUserAgent() { - return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0"; + if (os.platform() == 'linux') + return "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" + else + return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0"; } }; diff --git a/uncompressed/hangouts/package.json b/uncompressed/hangouts/package.json index c8a3254..f0e0184 100644 --- a/uncompressed/hangouts/package.json +++ b/uncompressed/hangouts/package.json @@ -1,7 +1,7 @@ { "id": "hangouts", "name": "Hangouts", - "version": "1.0.1", + "version": "1.0.2", "description": "Hangouts", "main": "index.js", "author": "Stefan Malzner ", -- cgit v1.2.3-70-g09d2