diff options
author | 2020-04-01 08:34:45 +0200 | |
---|---|---|
committer | 2020-04-02 12:07:39 +0200 | |
commit | 143583b74f69bb69ccddb6cb2fa7ae744bc76e72 (patch) | |
tree | 906ef68de7101d247c3fafb7369c6288a7e7f911 /uncompressed/hangoutschat/index.js | |
parent | Update recipe_request.md (diff) | |
download | ferdium-recipes-143583b74f69bb69ccddb6cb2fa7ae744bc76e72.tar.gz ferdium-recipes-143583b74f69bb69ccddb6cb2fa7ae744bc76e72.tar.zst ferdium-recipes-143583b74f69bb69ccddb6cb2fa7ae744bc76e72.zip |
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.
Diffstat (limited to 'uncompressed/hangoutschat/index.js')
-rw-r--r-- | uncompressed/hangoutschat/index.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/uncompressed/hangoutschat/index.js b/uncompressed/hangoutschat/index.js index 560a173..95e7fa5 100644 --- a/uncompressed/hangoutschat/index.js +++ b/uncompressed/hangoutschat/index.js | |||
@@ -1,7 +1,12 @@ | |||
1 | var os = require('os') | ||
2 | |||
1 | // just pass through Franz | 3 | // just pass through Franz |
2 | module.exports = Franz => | 4 | module.exports = Franz => |
3 | class HangoutsChat extends Franz { | 5 | class HangoutsChat extends Franz { |
4 | overrideUserAgent() { | 6 | overrideUserAgent() { |
5 | return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0"; | 7 | if (os.platform() == 'linux') |
8 | return "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" | ||
9 | else | ||
10 | return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0"; | ||
6 | } | 11 | } |
7 | }; | 12 | }; |