aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/chatgpt/index.js
diff options
context:
space:
mode:
authorLibravatar André Oliveira <oliveira.andrerodrigues95@gmail.com>2023-01-13 17:36:14 +0000
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2023-01-14 04:42:25 +0530
commit00c0a3f79a9a8fd5bd2025c922557e48a7a4b401 (patch)
tree7a810b558d17f4ac05a5c7e23012180a83a3ded4 /recipes/chatgpt/index.js
parentFix: Infomaniak unread messages badge to exclude spam emails (#273) (diff)
downloadferdium-recipes-00c0a3f79a9a8fd5bd2025c922557e48a7a4b401.tar.gz
ferdium-recipes-00c0a3f79a9a8fd5bd2025c922557e48a7a4b401.tar.zst
ferdium-recipes-00c0a3f79a9a8fd5bd2025c922557e48a7a4b401.zip
feat: add ChatGPT recipe
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};