Skip to content

Commit c256f42

Browse files
committed
Change button insertion order and simplify loading state detection for Z.AI chatbot
1 parent 950a294 commit c256f42

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

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

‎packages/browser/src/content-scripts/send-prompt-content-script/chatbots/z-ai.ts‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,14 @@ export const z_ai: Chatbot = {
6565
}
6666
;(copy_button as HTMLElement).click()
6767
},
68-
insert_button: (f, b) =>
69-
f.insertBefore(b, f.children[f.children.length])
68+
insert_button: (f, b) => f.insertBefore(b, f.children[0])
7069
})
7170
}
7271

7372
observe_for_responses({
7473
chatbot_name: 'Z.AI',
7574
is_generating: () =>
76-
!!document.querySelector(
77-
'path[d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm6-2.438c0-.724.588-1.312 1.313-1.312h4.874c.725 0 1.313.588 1.313 1.313v4.874c0 .725-.588 1.313-1.313 1.313H9.564a1.312 1.312 0 01-1.313-1.313V9.564z"]'
78-
),
75+
!document.querySelector('button[id="send-message-button"]'),
7976
footer_selector: '.chat-assistant + div',
8077
add_buttons
8178
})

0 commit comments

Comments
 (0)