File tree Expand file tree Collapse file tree
content-scripts/send-prompt-content-script/chatbots Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,9 +15,6 @@ import { show_response_ready_notification } from '../utils/show-response-ready-n
1515
1616export const chatgpt : Chatbot = {
1717 wait_until_ready : async ( ) => {
18- const max_wait_time = 2000
19- const start_time = Date . now ( )
20-
2118 await new Promise ( ( resolve ) => {
2219 const check_for_element = ( ) => {
2320 if (
@@ -26,8 +23,6 @@ export const chatgpt: Chatbot = {
2623 )
2724 ) {
2825 resolve ( null )
29- } else if ( Date . now ( ) - start_time >= max_wait_time ) {
30- resolve ( null )
3126 } else {
3227 setTimeout ( check_for_element , 100 )
3328 }
@@ -105,7 +100,7 @@ export const chatgpt: Chatbot = {
105100
106101 params . footer . insertBefore (
107102 apply_response_button ,
108- params . footer . children [ params . footer . children . length - 1 ]
103+ params . footer . children [ params . footer . children . length ]
109104 )
110105
111106 apply_response_button . focus ( )
@@ -123,7 +118,7 @@ export const chatgpt: Chatbot = {
123118 show_response_ready_notification ( { chatbot_name : 'ChatGPT' } )
124119
125120 const all_footers = document . querySelectorAll (
126- '.agent-turn > div:nth-of-type(2) > div > div '
121+ '.agent-turn > div:nth-of-type(2) > div'
127122 )
128123 all_footers . forEach ( ( footer ) => {
129124 add_buttons ( {
Original file line number Diff line number Diff line change 44 "name" : " Code Web Chat Connector" ,
55 "short_name" : " CWC" ,
66 "description" : " Initialize 15+ chatbots and manage websites for context." ,
7- "version" : " 1.22 .0" ,
7+ "version" : " 1.23 .0" ,
88 "homepage_url" : " https://github.com/robertpiosik/CodeWebChat" ,
99 "icons" : {
1010 "16" : " icons/icon-16.png" ,
You can’t perform that action at this time.
0 commit comments