From 906e460eaa88df6d04b2094c75ad6d07290bcb6e Mon Sep 17 00:00:00 2001 From: lencx Date: Sun, 24 Mar 2024 22:17:25 +0800 Subject: [PATCH] extensions: noi ask --- extensions/README.md | 2 +- extensions/noi-ask/main.js | 22 ++++++++++++++++++++++ extensions/noi-ask/manifest.json | 6 ++++-- extensions/noi.extensions.json | 2 +- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/extensions/README.md b/extensions/README.md index 162db73..43e6727 100644 --- a/extensions/README.md +++ b/extensions/README.md @@ -9,7 +9,7 @@ Learn more: [electronjs/doc](https://www.electronjs.org/docs/latest/api/extensio | Name | Version | Description | | --- | --- | --- | -| [@noi/ask](https://github.com/lencx/Noi/tree/main/extensions/noi-ask) | 0.1.5 | The best assistant for batch asking and quick typing of prompts. | +| [@noi/ask](https://github.com/lencx/Noi/tree/main/extensions/noi-ask) | 0.1.7 | The best assistant for batch asking and quick typing of prompts. | | [@noi/ask-custom](https://github.com/lencx/Noi/tree/main/extensions/noi-ask-custom) | 0.1.0 | The best assistant for batch asking and quick typing of prompts. | | [@noi/export-chatgpt](https://github.com/lencx/Noi/tree/main/extensions/noi-export-chatgpt) | 0.1.0 | ChatGPT chat history export, supports PDF, Image, and Markdown formats. | | [@noi/reset](https://github.com/lencx/Noi/tree/main/extensions/noi-reset) | 0.1.0 | Reset certain website styles to enhance compatibility with Noi. | diff --git a/extensions/noi-ask/main.js b/extensions/noi-ask/main.js index f2b68a3..6149624 100644 --- a/extensions/noi-ask/main.js +++ b/extensions/noi-ask/main.js @@ -310,6 +310,26 @@ class TongyiAsk extends NoiAsk { } } +class GroqAsk extends NoiAsk { + static name = 'Groq'; + static url = 'https://groq.com'; + + static submit() { + const btn = document.querySelector('form button[type="submit"]'); + if (btn) btn.click(); + } +} + +class SunoAsk extends NoiAsk { + static name = 'Suno AI'; + static url = 'https://app.suno.ai'; + + static submit() { + const btn = Array.from(document.querySelectorAll('button')).find(i => i.innerText.includes('Create')); + if (btn) btn.click(); + } +} + window.NoiAsk = { OpenAIAsk, PoeAsk, @@ -325,4 +345,6 @@ window.NoiAsk = { DoubaoAsk, ChatGMLAsk, TongyiAsk, + GroqAsk, + SunoAsk, }; diff --git a/extensions/noi-ask/manifest.json b/extensions/noi-ask/manifest.json index f536c1e..f727563 100644 --- a/extensions/noi-ask/manifest.json +++ b/extensions/noi-ask/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "@noi/ask", - "version": "0.1.5", + "version": "0.1.7", "homepage": "https://github.com/lencx/Noi/tree/main/extensions/noi-ask", "description": "The best assistant for batch asking and quick typing of prompts.", "content_scripts": [ @@ -14,13 +14,15 @@ "https://huggingface.co/chat/*", "https://www.perplexity.ai/*", "https://copilot.microsoft.com/*", + "https://groq.com/*", "https://pi.ai/talk/*", "https://www.coze.com/home/*", "https://you.com/*", "https://www.coze.cn/home/*", "https://chatglm.cn/*", "https://www.doubao.com/*", - "https://tongyi.aliyun.com/qianwen/*" + "https://tongyi.aliyun.com/qianwen/*", + "https://app.suno.ai/*" ], "js": ["main.js"], "run_at": "document_end", diff --git a/extensions/noi.extensions.json b/extensions/noi.extensions.json index e52b617..6f87d5c 100644 --- a/extensions/noi.extensions.json +++ b/extensions/noi.extensions.json @@ -5,7 +5,7 @@ { "name": "@noi/ask", "description": "The best assistant for batch asking and quick typing of prompts.", - "version": "0.1.5", + "version": "0.1.7", "url": "https://github.com/lencx/Noi/tree/main/extensions/noi-ask", "dirname": "noi-ask", "disabled": false