aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/chatgpt/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/chatgpt/index.js')
-rw-r--r--recipes/chatgpt/index.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/recipes/chatgpt/index.js b/recipes/chatgpt/index.js
new file mode 100644
index 0000000..80eaf51
--- /dev/null
+++ b/recipes/chatgpt/index.js
@@ -0,0 +1,18 @@
1module.exports = (Ferdium) => class Messenger extends Ferdium {
2 overrideUserAgent() {
3 return window.navigator.userAgent.replace(/(Ferdium|Electron)\/\S+ \([^)]+\)/g, '').trim();
4 }
5
6 modifyRequestHeaders() {
7 return [
8 {
9 headers: {
10 'user-agent': window.navigator.userAgent.replace(/(Ferdium|Electron)\/\S+ \([^)]+\)/g, '').trim(),
11 },
12 requestFilters: {
13 urls: ['*://*/*'],
14 },
15 },
16 ];
17 }
18};