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/googledrive/index.js | 7 ++++++- uncompressed/googledrive/package.json | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'uncompressed/googledrive') diff --git a/uncompressed/googledrive/index.js b/uncompressed/googledrive/index.js index 3d2e725..9c4da64 100644 --- a/uncompressed/googledrive/index.js +++ b/uncompressed/googledrive/index.js @@ -1,6 +1,11 @@ +var os = require('os') + module.exports = Franz => class googledrive 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/googledrive/package.json b/uncompressed/googledrive/package.json index f741db5..5b97042 100644 --- a/uncompressed/googledrive/package.json +++ b/uncompressed/googledrive/package.json @@ -1,7 +1,7 @@ { "id": "googledrive", "name": "Google Drive", - "version": "1.0.2", + "version": "1.0.3", "description": "Google Drive", "main": "index.js", "author": "Djonathan Goulart", @@ -22,4 +22,4 @@ }, "openDevTools": false } -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2