diff options
Diffstat (limited to 'uncompressed/whatsapp/index.js')
-rw-r--r-- | uncompressed/whatsapp/index.js | 5 |
1 files changed, 4 insertions, 1 deletions
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 | ||
3 | module.exports = (Franz) => | 3 | module.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: ['*://*/*'], |