aboutsummaryrefslogtreecommitdiffstats
path: root/uncompressed/googlecalendar/index.js
diff options
context:
space:
mode:
authorLibravatar Tomas Popela <tomas.popela@gmail.com>2020-04-01 08:34:45 +0200
committerLibravatar Tomas Popela <tomas.popela@gmail.com>2020-04-02 12:07:39 +0200
commit143583b74f69bb69ccddb6cb2fa7ae744bc76e72 (patch)
tree906ef68de7101d247c3fafb7369c6288a7e7f911 /uncompressed/googlecalendar/index.js
parentUpdate recipe_request.md (diff)
downloadferdium-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/googlecalendar/index.js')
-rw-r--r--uncompressed/googlecalendar/index.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/uncompressed/googlecalendar/index.js b/uncompressed/googlecalendar/index.js
index 5416ca3..401a28f 100644
--- a/uncompressed/googlecalendar/index.js
+++ b/uncompressed/googlecalendar/index.js
@@ -1,6 +1,11 @@
1var os = require('os')
2
1module.exports = Franz => 3module.exports = Franz =>
2 class googlecalendar extends Franz { 4 class googlecalendar extends Franz {
3 overrideUserAgent() { 5 overrideUserAgent() {
4 return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0"; 6 if (os.platform() == 'linux')
7 return "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0"
8 else
9 return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0";
5 } 10 }
6 }; 11 };