Skip to content

Commit d3dc9e0

Browse files
committed
Add text-based fallback for detecting the thumb up button in AI Studio responses
1 parent 2e68e42 commit d3dc9e0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,12 @@ export const ai_studio: Chatbot = {
430430
'ms-chat-turn .turn-footer'
431431
)
432432
all_footers.forEach((footer) => {
433-
if (footer.querySelector('button[iconname="thumb_up"]')) {
433+
const has_thumb_up =
434+
footer.querySelector('button[iconname="thumb_up"]') ||
435+
Array.from(footer.querySelectorAll('button span')).some(
436+
(span) => span.textContent?.trim() == 'thumb_up'
437+
)
438+
if (has_thumb_up) {
434439
show_response_ready_notification({ chatbot_name: 'AI Studio' })
435440
add_buttons(footer)
436441
}

0 commit comments

Comments
 (0)