From 00c0a3f79a9a8fd5bd2025c922557e48a7a4b401 Mon Sep 17 00:00:00 2001 From: André Oliveira Date: Fri, 13 Jan 2023 17:36:14 +0000 Subject: feat: add ChatGPT recipe --- recipes/chatgpt/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 recipes/chatgpt/index.js (limited to 'recipes/chatgpt/index.js') 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 @@ +module.exports = (Ferdium) => class Messenger extends Ferdium { + overrideUserAgent() { + return window.navigator.userAgent.replace(/(Ferdium|Electron)\/\S+ \([^)]+\)/g, '').trim(); + } + + modifyRequestHeaders() { + return [ + { + headers: { + 'user-agent': window.navigator.userAgent.replace(/(Ferdium|Electron)\/\S+ \([^)]+\)/g, '').trim(), + }, + requestFilters: { + urls: ['*://*/*'], + }, + }, + ]; + } +}; -- cgit v1.2.3-70-g09d2