@@ -10,6 +10,11 @@ import debounce from 'lodash/debounce'
1010
1111import { useStorage } from '@plasmohq/storage/hook'
1212
13+
14+ // export const getInlineAnchor: PlasmoGetInlineAnchor = async () => ({
15+ // element: document.querySelector("#pricing"),
16+ // insertPosition: "afterend"
17+ // })
1318import {
1419 CUSTOM_PROMPT ,
1520 HISTORY_KEY ,
@@ -22,7 +27,7 @@ import { sleep } from '../utils'
2227export type AutoCompleteProps = { }
2328
2429export const config : PlasmoContentScript = {
25- matches : [ 'https://chat.openai.com/*' ]
30+ matches : [ 'https://chat.openai.com/*' , "https://chatgpt.com/*" ]
2631}
2732
2833export const getStyle = ( ) => {
@@ -33,7 +38,7 @@ export const getStyle = () => {
3338
3439const getTextArea = async ( ) => {
3540 try {
36- const textArea = document . querySelector ( 'textarea' )
41+ const textArea = document . querySelector ( '#prompt- textarea ' )
3742 if ( textArea ) {
3843 if ( textArea . parentElement . nodeName !== 'DIV' ) {
3944 throw Error ( '' )
@@ -54,7 +59,11 @@ const getTextArea = async () => {
5459
5560export const getInlineAnchor : PlasmoGetInlineAnchor = async ( ) => {
5661 const area = await getTextArea ( )
57- return area
62+
63+ return {
64+ element : area . parentElement ,
65+ insertPosition : "beforebegin" ,
66+ }
5867}
5968
6069const ITEM_PREFIX = `chatgpt-prompt-helper-item-_`
0 commit comments