aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar beppe9000 <6625123+beppe9000@users.noreply.github.com>2020-09-19 19:00:48 +0200
committerLibravatar GitHub <noreply@github.com>2020-09-19 18:00:48 +0100
commit2466d5c99758fe54075b2b6c482998e58932c11a (patch)
treeddfa681819488ff973f3362fc28620755d8c923d
parentFix notifications on muted messages for Telegram React (#197) (diff)
downloadferdium-recipes-2466d5c99758fe54075b2b6c482998e58932c11a.tar.gz
ferdium-recipes-2466d5c99758fe54075b2b6c482998e58932c11a.tar.zst
ferdium-recipes-2466d5c99758fe54075b2b6c482998e58932c11a.zip
Fix UA string for WhatsApp (#275)
* Fixed UA string for Whatsapp Works for me. Tested on Windows 10. * bump version of package * publish package
-rw-r--r--all.json2
-rw-r--r--archives/whatsapp.tar.gzbin183548 -> 183571 bytes
-rw-r--r--uncompressed/whatsapp/index.js5
-rw-r--r--uncompressed/whatsapp/package.json5
4 files changed, 9 insertions, 3 deletions
diff --git a/all.json b/all.json
index e235812..5868916 100644
--- a/all.json
+++ b/all.json
@@ -1170,7 +1170,7 @@
1170 "featured": true, 1170 "featured": true,
1171 "id": "whatsapp", 1171 "id": "whatsapp",
1172 "name": "WhatsApp", 1172 "name": "WhatsApp",
1173 "version": "2.0.7", 1173 "version": "2.0.8",
1174 "icons": { 1174 "icons": {
1175 "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/whatsapp/icon.png", 1175 "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/whatsapp/icon.png",
1176 "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/whatsapp/icon.svg" 1176 "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/whatsapp/icon.svg"
diff --git a/archives/whatsapp.tar.gz b/archives/whatsapp.tar.gz
index 4bb91a0..834ae2e 100644
--- a/archives/whatsapp.tar.gz
+++ b/archives/whatsapp.tar.gz
Binary files differ
diff --git a/uncompressed/whatsapp/index.js b/uncompressed/whatsapp/index.js
index 504a70e..a0ff71f 100644
--- a/uncompressed/whatsapp/index.js
+++ b/uncompressed/whatsapp/index.js
@@ -2,11 +2,14 @@
2 2
3module.exports = (Franz) => 3module.exports = (Franz) =>
4 class Messenger extends Franz { 4 class Messenger extends Franz {
5 overrideUserAgent() {
6 return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+( \([^)]+\))?/g, "").trim();
7 }
5 modifyRequestHeaders() { 8 modifyRequestHeaders() {
6 return [ 9 return [
7 { 10 {
8 headers: { 11 headers: {
9 'user-agent': window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g,"").trim(), 12 'user-agent': window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+( \([^)]+\))?/g, "").trim(),
10 }, 13 },
11 requestFilters: { 14 requestFilters: {
12 urls: ['*://*/*'], 15 urls: ['*://*/*'],
diff --git a/uncompressed/whatsapp/package.json b/uncompressed/whatsapp/package.json
index c4c60ce..990718e 100644
--- a/uncompressed/whatsapp/package.json
+++ b/uncompressed/whatsapp/package.json
@@ -1,10 +1,13 @@
1{ 1{
2 "id": "whatsapp", 2 "id": "whatsapp",
3 "name": "WhatsApp", 3 "name": "WhatsApp",
4 "version": "2.0.7", 4 "version": "2.0.8",
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>",
8 "contributors": [
9 "beppe9000 <6625123+beppe9000@users.noreply.github.com>"
10 ],
8 "license": "MIT", 11 "license": "MIT",
9 "config": { 12 "config": {
10 "serviceURL": "https://web.whatsapp.com", 13 "serviceURL": "https://web.whatsapp.com",