Skip to content

Commit

Permalink
Moved non-div check from modals.init() to .open() to support `.ob…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Jan 13, 2025
1 parent d5d2429 commit 9aac279
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chatgpt/chatgpt-auto-talk/chatgpt-auto-talk.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
// @description:zu Dlala izimpendulo ze-ChatGPT ngokuzenzakalela
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2025.1.12
// @version 2025.1.12.1
// @license MIT
// @icon https://assets.chatgptautotalk.com/images/icons/openai/black/icon48.png?v=9f1ed3c
// @icon64 https://assets.chatgptautotalk.com/images/icons/openai/black/icon64.png?v=9f1ed3c
Expand Down Expand Up @@ -485,13 +485,13 @@

open(modalType, modalSubType) {
const modal = modalSubType ? this[modalType][modalSubType]() : this[modalType]() // show modal
if (!modal) return // since no div returned
this.stack.unshift(modalSubType ? `${modalType}_${modalSubType}` : modalType) // add to stack
this.init(modal) // add classes + starry bg
this.observeRemoval(modal, modalType, modalSubType) // to maintain stack for proper nav
},

init(modal) {
if (!modal) return // to support non-div this.open()s
if (!this.styles) this.stylize() // to init/append stylesheet
modal.classList.add('no-user-select', this.class) ; modal.parentNode.classList.add(`${this.class}-bg`)
fillStarryBG(modal) // add starry bg
Expand Down

0 comments on commit 9aac279

Please sign in to comment.