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/icon.svg | 48 ++++++++++++++++++++++++++++++++++++++++++++ recipes/chatgpt/index.js | 18 +++++++++++++++++ recipes/chatgpt/package.json | 9 +++++++++ recipes/chatgpt/webview.js | 1 + 4 files changed, 76 insertions(+) create mode 100644 recipes/chatgpt/icon.svg create mode 100644 recipes/chatgpt/index.js create mode 100644 recipes/chatgpt/package.json create mode 100644 recipes/chatgpt/webview.js (limited to 'recipes') diff --git a/recipes/chatgpt/icon.svg b/recipes/chatgpt/icon.svg new file mode 100644 index 0000000..116e5d5 --- /dev/null +++ b/recipes/chatgpt/icon.svg @@ -0,0 +1,48 @@ + + + + + + + + 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: ['*://*/*'], + }, + }, + ]; + } +}; diff --git a/recipes/chatgpt/package.json b/recipes/chatgpt/package.json new file mode 100644 index 0000000..aeed764 --- /dev/null +++ b/recipes/chatgpt/package.json @@ -0,0 +1,9 @@ +{ + "id": "chatgpt", + "name": "ChatGPT", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://chat.openai.com/chat" + } +} diff --git a/recipes/chatgpt/webview.js b/recipes/chatgpt/webview.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/chatgpt/webview.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; -- cgit v1.2.3-54-g00ecf