diff options
author | 2023-09-03 00:56:32 +0100 | |
---|---|---|
committer | 2023-09-03 01:26:49 +0000 | |
commit | 8cfacf8259e430686afeb15e5ade365a87d2e4fc (patch) | |
tree | 0a3b347355d43546af6e5844b9cb083458d9f633 /recipes/chatgpt/index.js | |
parent | add dictcp as a contributor for code (#415) (diff) | |
download | ferdium-recipes-8cfacf8259e430686afeb15e5ade365a87d2e4fc.tar.gz ferdium-recipes-8cfacf8259e430686afeb15e5ade365a87d2e4fc.tar.zst ferdium-recipes-8cfacf8259e430686afeb15e5ade365a87d2e4fc.zip |
Fix issue with login with google
Diffstat (limited to 'recipes/chatgpt/index.js')
-rw-r--r-- | recipes/chatgpt/index.js | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/recipes/chatgpt/index.js b/recipes/chatgpt/index.js index 1392dcb..dd41f72 100644 --- a/recipes/chatgpt/index.js +++ b/recipes/chatgpt/index.js | |||
@@ -1,23 +1 @@ | |||
1 | module.exports = Ferdium => | module.exports = Ferdium => Ferdium; | |
2 | class Messenger extends Ferdium { | ||
3 | overrideUserAgent() { | ||
4 | return window.navigator.userAgent | ||
5 | .replaceAll(/(Ferdium|Electron)\/\S+ \([^)]+\)/g, '') | ||
6 | .trim(); | ||
7 | } | ||
8 | |||
9 | modifyRequestHeaders() { | ||
10 | return [ | ||
11 | { | ||
12 | headers: { | ||
13 | 'user-agent': window.navigator.userAgent | ||
14 | .replaceAll(/(Ferdium|Electron)\/\S+ \([^)]+\)/g, '') | ||
15 | .trim(), | ||
16 | }, | ||
17 | requestFilters: { | ||
18 | urls: ['*://*/*'], | ||
19 | }, | ||
20 | }, | ||
21 | ]; | ||
22 | } | ||
23 | }; | ||