From 9bb008c0a68905ccd75c478afe62edf24b9c60a6 Mon Sep 17 00:00:00 2001 From: Haitham Mohamed Date: Tue, 15 Oct 2024 07:23:44 +0300 Subject: [PATCH] Add DuckDuckGo AI Chat (#597) --- recipes/duckduckgo-ai-chat/icon.svg | 1 + recipes/duckduckgo-ai-chat/index.js | 1 + recipes/duckduckgo-ai-chat/package.json | 9 +++++++++ recipes/duckduckgo-ai-chat/webview.js | 16 ++++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 recipes/duckduckgo-ai-chat/icon.svg create mode 100644 recipes/duckduckgo-ai-chat/index.js create mode 100644 recipes/duckduckgo-ai-chat/package.json create mode 100644 recipes/duckduckgo-ai-chat/webview.js diff --git a/recipes/duckduckgo-ai-chat/icon.svg b/recipes/duckduckgo-ai-chat/icon.svg new file mode 100644 index 000000000..a816a6b49 --- /dev/null +++ b/recipes/duckduckgo-ai-chat/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/recipes/duckduckgo-ai-chat/index.js b/recipes/duckduckgo-ai-chat/index.js new file mode 100644 index 000000000..dd41f7287 --- /dev/null +++ b/recipes/duckduckgo-ai-chat/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/duckduckgo-ai-chat/package.json b/recipes/duckduckgo-ai-chat/package.json new file mode 100644 index 000000000..97afaad0e --- /dev/null +++ b/recipes/duckduckgo-ai-chat/package.json @@ -0,0 +1,9 @@ +{ + "id": "duckduckgo-ai-chat", + "name": "DuckDuckGo AI Chat", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://duckduckgo.com/aichat" + } +} diff --git a/recipes/duckduckgo-ai-chat/webview.js b/recipes/duckduckgo-ai-chat/webview.js new file mode 100644 index 000000000..b5ee0de6c --- /dev/null +++ b/recipes/duckduckgo-ai-chat/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your DuckDuckGo AI Chat service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +};