VladyslavH commited on
Commit
6dd5a86
·
1 Parent(s): f290234

Send with enter

Browse files
Files changed (1) hide show
  1. static/script.js +5 -1
static/script.js CHANGED
@@ -81,10 +81,13 @@
81
  const send = () => {
82
  // Try multiple selectors to find the send button
83
  const selectors = [
 
84
  '#send-btn',
 
85
  'button[id="send-btn"]',
86
  '.gr-button:contains("Send")',
87
  'button:contains("Send")',
 
88
  '#send-btn button',
89
  '[data-testid*="send"]',
90
  'button[variant="primary"]'
@@ -97,7 +100,8 @@
97
  // Handle :contains selector manually
98
  const buttons = document.querySelectorAll('button');
99
  for (let button of buttons) {
100
- if (button.textContent.trim() === 'Send') {
 
101
  btn = button;
102
  break;
103
  }
 
81
  const send = () => {
82
  // Try multiple selectors to find the send button
83
  const selectors = [
84
+ '#send-btn-visible',
85
  '#send-btn',
86
+ 'button[id="send-btn-visible"]',
87
  'button[id="send-btn"]',
88
  '.gr-button:contains("Send")',
89
  'button:contains("Send")',
90
+ '#send-btn-visible button',
91
  '#send-btn button',
92
  '[data-testid*="send"]',
93
  'button[variant="primary"]'
 
100
  // Handle :contains selector manually
101
  const buttons = document.querySelectorAll('button');
102
  for (let button of buttons) {
103
+ const text = button.textContent.trim();
104
+ if (text === 'Send' || text === '➤') {
105
  btn = button;
106
  break;
107
  }