diff options
author | 2020-04-26 09:30:03 +0000 | |
---|---|---|
committer | 2020-04-26 09:30:03 +0000 | |
commit | 8b2dd4dfd4b12af67f666b2635d26e09469e9e86 (patch) | |
tree | 78fd48a9d14fb96320dcfee3c1863caa9f8bf68d /uncompressed | |
parent | Implement modifyRequestHeaders for Hangouts and document (#137) (diff) | |
download | ferdium-recipes-8b2dd4dfd4b12af67f666b2635d26e09469e9e86.tar.gz ferdium-recipes-8b2dd4dfd4b12af67f666b2635d26e09469e9e86.tar.zst ferdium-recipes-8b2dd4dfd4b12af67f666b2635d26e09469e9e86.zip |
WhatsApp - Chrome error every time the service is loaded (#140)
Diffstat (limited to 'uncompressed')
-rw-r--r-- | uncompressed/whatsapp/index.js | 16 | ||||
-rw-r--r-- | uncompressed/whatsapp/package.json | 2 |
2 files changed, 12 insertions, 6 deletions
diff --git a/uncompressed/whatsapp/index.js b/uncompressed/whatsapp/index.js index f9b8099..504a70e 100644 --- a/uncompressed/whatsapp/index.js +++ b/uncompressed/whatsapp/index.js | |||
@@ -2,10 +2,16 @@ | |||
2 | 2 | ||
3 | module.exports = (Franz) => | 3 | module.exports = (Franz) => |
4 | class Messenger extends Franz { | 4 | class Messenger extends Franz { |
5 | overrideUserAgent() { | 5 | modifyRequestHeaders() { |
6 | return window.navigator.userAgent.replace( | 6 | return [ |
7 | /(Ferdi|Electron)\/\S+ \([^)]+\)/g, | 7 | { |
8 | "" | 8 | headers: { |
9 | ); | 9 | 'user-agent': window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g,"").trim(), |
10 | }, | ||
11 | requestFilters: { | ||
12 | urls: ['*://*/*'], | ||
13 | } | ||
14 | } | ||
15 | ] | ||
10 | } | 16 | } |
11 | }; | 17 | }; |
diff --git a/uncompressed/whatsapp/package.json b/uncompressed/whatsapp/package.json index 5331ac9..19daf29 100644 --- a/uncompressed/whatsapp/package.json +++ b/uncompressed/whatsapp/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "whatsapp", | 2 | "id": "whatsapp", |
3 | "name": "WhatsApp", | 3 | "name": "WhatsApp", |
4 | "version": "2.0.2", | 4 | "version": "2.0.3", |
5 | "description": "WhatsApp", | 5 | "description": "WhatsApp", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Stefan Malzner <stefan@adlk.io>", | 7 | "author": "Stefan Malzner <stefan@adlk.io>", |