From a6253d335d29b233649cf66042c5cb6615298d9a Mon Sep 17 00:00:00 2001 From: lencx Date: Sun, 15 Dec 2024 00:57:15 +0800 Subject: [PATCH] extensions: add sora (noi-ask) --- README.md | 2 +- configs/noi.mode.cn.json | 8 +++++++- configs/noi.mode.json | 8 +++++++- extensions/README.md | 2 +- extensions/noi-ask/main.js | 12 ++++++++++++ extensions/noi-ask/manifest.json | 3 ++- extensions/noi.extensions.json | 2 +- 7 files changed, 31 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c09c835..d8d64a2 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,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.13 | 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.14 | 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.1 | ChatGPT chat history export, supports PDF, Image, and Markdown formats. | | [@noi/reset](https://github.com/lencx/Noi/tree/main/extensions/noi-reset) | 0.1.3 | Reset certain website styles to enhance compatibility with Noi. | diff --git a/configs/noi.mode.cn.json b/configs/noi.mode.cn.json index 6ff02fb..2e4c368 100644 --- a/configs/noi.mode.cn.json +++ b/configs/noi.mode.cn.json @@ -1,6 +1,6 @@ { "name": "Noi Mode", - "version": "0.1.7", + "version": "0.1.8", "sync": "https://github.com/lencx/noi/blob/main/configs/noi.mode.cn.json", "modes": [ { @@ -51,6 +51,12 @@ "text": "Gemini", "url": "https://gemini.google.com" }, + { + "id": "noi:sora", + "parent": "noi@ai", + "text": "Sora", + "url": "https://sora.com" + }, { "id": "noi:poe", "parent": "noi@ai", diff --git a/configs/noi.mode.json b/configs/noi.mode.json index 3ec180c..ecda096 100644 --- a/configs/noi.mode.json +++ b/configs/noi.mode.json @@ -1,6 +1,6 @@ { "name": "Noi Mode", - "version": "0.1.10", + "version": "0.1.11", "sync": "https://github.com/lencx/noi/blob/main/configs/noi.mode.json", "modes": [ { @@ -57,6 +57,12 @@ "text": "Gemini", "url": "https://gemini.google.com" }, + { + "id": "noi:sora", + "parent": "noi@ai", + "text": "Sora", + "url": "https://sora.com" + }, { "id": "noi:poe", "parent": "noi@ai", diff --git a/extensions/README.md b/extensions/README.md index a2c8054..016539b 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.13 | 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.14 | 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.1 | ChatGPT chat history export, supports PDF, Image, and Markdown formats. | | [@noi/reset](https://github.com/lencx/Noi/tree/main/extensions/noi-reset) | 0.1.3 | Reset certain website styles to enhance compatibility with Noi. | diff --git a/extensions/noi-ask/main.js b/extensions/noi-ask/main.js index f079c2c..27a9dc1 100644 --- a/extensions/noi-ask/main.js +++ b/extensions/noi-ask/main.js @@ -70,6 +70,17 @@ class OpenAIAsk extends NoiAsk { } } +class SoraAsk extends NoiAsk { + static name = 'Sora'; + static url = 'https://sora.com'; + + static submit() { + const buttons = document.querySelectorAll('.surface-composer button'); + const lastButton = buttons[buttons.length - 1]; + if (lastButton) this.autoClick(lastButton); + } +} + class PoeAsk extends NoiAsk { static name = 'Poe'; static url = 'https://poe.com'; @@ -382,6 +393,7 @@ class JimengAsk extends NoiAsk { window.NoiAsk = { OpenAIAsk, + SoraAsk, PoeAsk, ClaudeAsk, GeminiAsk, diff --git a/extensions/noi-ask/manifest.json b/extensions/noi-ask/manifest.json index ddb1a29..58ccc24 100644 --- a/extensions/noi-ask/manifest.json +++ b/extensions/noi-ask/manifest.json @@ -1,13 +1,14 @@ { "manifest_version": 3, "name": "@noi/ask", - "version": "0.1.13", + "version": "0.1.14", "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": [ { "matches": [ "https://chatgpt.com/*", + "https://sora.com/*", "https://gemini.google.com/*", "https://poe.com/*", "https://claude.ai/*", diff --git a/extensions/noi.extensions.json b/extensions/noi.extensions.json index c1931c1..e217bd4 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.13", + "version": "0.1.14", "url": "https://github.com/lencx/Noi/tree/main/extensions/noi-ask", "dirname": "noi-ask", "disabled": false