Skip to content

Commit

Permalink
Update detection of chat parent element (fixes #2)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewdowney committed Jun 3, 2023
1 parent ad6fa7f commit 1416711
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/com/mjdowney/rendergpt.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
(defn prompt-for-code-block
"Given ChatGPT's response code, get the text of the preceding user prompt."
[code-block-ele]
(let [chat-parent-sel "flex flex-col items-center text-sm dark:bg-gray-800"
(let [chat-parent-sel "flex flex-col text-sm dark:bg-gray-800"
chat-parent (first (js/document.getElementsByClassName chat-parent-sel))
user-msgs (->> (.-children chat-parent)
; filter out the model selection element at the top of
Expand Down Expand Up @@ -334,3 +334,10 @@
(inject-stylesheet (js/chrome.runtime.getURL "rendergpt.css"))
(register-on-mutation on-mutation)
(js/console.log "injected rendergpt"))

(comment
; Example prompt:
; Create a clickable, draggable HTML window to float over the DOM with a title
; bar and a close button, imitating a native window. Make it sleek and
; beautiful, use HTML, CSS, and JavaScript.
)

0 comments on commit 1416711

Please sign in to comment.