Skip to content

Commit ab03b23

Browse files
committed
Add wait_until_ready implementation for Meta chatbot
- in meta, implement wait for input element └── apps └── browser └── src └── content-scripts └── send-prompt-content-script └── chatbots ├── ai-studio.ts ├── arena.ts ├── chatgpt.ts ├── claude.ts ├── copilot.ts ├── deepseek.ts ├── doubao.ts ├── gemini.ts ├── github-copilot.ts ├── grok.ts ├── hugging-chat.ts ├── index.ts ├── kimi.ts ├── meta.ts ├── mistral.ts ├── open-webui.ts ├── openrouter.ts ├── qwen.ts ├── together.ts ├── yuanbao.ts └── z-ai.ts
1 parent ea0758a commit ab03b23

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

  • apps/browser/src/content-scripts/send-prompt-content-script/chatbots

‎apps/browser/src/content-scripts/send-prompt-content-script/chatbots/meta.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@ import {
66
import { report_initialization_error } from '../utils/report-initialization-error'
77

88
export const meta: Chatbot = {
9+
wait_until_ready: async () => {
10+
await new Promise((resolve) => {
11+
const check_for_element = () => {
12+
if (
13+
document.querySelector(
14+
'button[data-testid="composer-mode-dropdown-button"]'
15+
)
16+
) {
17+
resolve(null)
18+
} else {
19+
setTimeout(check_for_element, 100)
20+
}
21+
}
22+
check_for_element()
23+
})
24+
},
925
enter_message: async (params) => {
1026
const input_element = document.querySelector(
1127
'div[contenteditable="true"][data-testid="composer-input"]'

0 commit comments

Comments
 (0)