返回提交历史
Modified
g4f/requests/cdp.py
+5
-2
XFEstudio/gpt4free
Add 'Accept Cookies' and update placeholder selectors for improved user interaction
0701d8e6
代码差异
1 个文件
+5
-2
@@ -789,7 +789,7 @@ const targetTexts = [
789
789
'Accept All Cookies', 'Accept all cookies',
790
790
'Einwilligen', 'Alle akzeptieren',
791
791
'Zustimmen und weiter', 'Zustimmen',
792
'Run',
792
'Run', 'Accept Cookies',
793
793
...params.getAll('click')
794
794
];
795
795
const acceptBtns = (() => {
@@ -869,6 +869,7 @@ const fieldSelectors = [
869
869
'textarea[name="prompt"]',
870
870
'[class^="MessageInput__TextArea--"]',
871
871
'[placeholder="Type a message..."]',
872
'[placeholder="Ask anything…"]'
872
873
];
873
874
const textarea = document.querySelector(fieldSelectors.join(', '));
874
875
@@ -896,7 +897,8 @@ if (searchQuery && textarea) {
896
897
'[contenteditable="true"]',
897
898
'[placeholder="Message DeepSeek"]',
898
899
'.message-input-textarea',
899
'#chat-input'
900
'#chat-input',
901
'[placeholder="Ask anything…"]' // arena.ai
900
902
];
901
903
const editor = document.querySelector(fields.join(', '));
902
904
if (!editor) return;
@@ -939,6 +941,7 @@ const sendButtonSelectors = [
939
941
'.send-button',
940
942
'#send-message-button', // z.ai
941
943
'[data-testid="chat-submit"]', // grok.com
944
'[aria-label="Send message"]', // arena.ai
942
945
];
943
946
const sendButton = document.querySelector(sendButtonSelectors.join(', '));
944
947
if (sendButton) {