25 |
setTriggered(true)}>
34 |
99 | Enjoy this extension? Give us a 5-star rating at{' '} 100 | 105 | Chrome Web Store 106 | 107 |
108 | )} 109 |116 | Please login and pass Cloudflare check at{' '} 117 | 118 | chat.openai.com 119 | 120 | {retry > 0 && 121 | (() => { 122 | if (isBraveBrowser()) { 123 | return ( 124 | 125 | Still not working? Follow{' '} 126 | 127 | Brave Troubleshooting 128 | 129 | 130 | ) 131 | } else { 132 | return ( 133 | 134 | OpenAI requires passing a security check every once in a while. If this keeps 135 | happening, change AI provider to OpenAI API in the extension options. 136 | 137 | ) 138 | } 139 | })()} 140 |
141 | ) 142 | } 143 | if (error) { 144 | return ( 145 |146 | Failed to load response from ChatGPT: 147 | {error} 148 |
149 | ) 150 | } 151 | 152 | returnWaiting for ChatGPT response...
153 | } 154 | 155 | export default memo(ChatGPTQuery) 156 | -------------------------------------------------------------------------------- /src/content-script/Promotion.tsx: -------------------------------------------------------------------------------- 1 | import { useCallback } from 'react' 2 | import { captureEvent } from '../analytics' 3 | import type { PromotionResponse } from '../api' 4 | 5 | interface Props { 6 | data: PromotionResponse 7 | } 8 | 9 | function Promotion({ data }: Props) { 10 | const capturePromotionClick = useCallback(() => { 11 | captureEvent('click_promotion', { link: data.url }) 12 | }, [data.url]) 13 | 14 | return ( 15 | 22 |{data.title}
} 33 | {!!data.text &&{data.text}
} 34 |ChatGPT for Google
35 | 36 | 37 |42 | Tip:{' '} 43 | 44 | setup shortcuts 45 | {' '} 46 | for faster access. 47 |
48 | )} 49 | {(() => { 50 | if (accessTokenQuery.isLoading) { 51 | return ( 52 |63 | Please login and pass Cloudflare check at{' '} 64 | 65 | chat.openai.com 66 | 67 |
68 |