Skip to content

Commit e3daf26

Browse files
committed
Moved non-div check from modals.init() to .open() to support .observeRemoval() too ↞ [auto-sync from https://github.com/adamlui/ai-web-extensionss/tree/main/bravegpt]
1 parent 0439a30 commit e3daf26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

chatgpt/bravegpt/bravegpt.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
// @description:zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!)
149149
// @author KudoAI
150150
// @namespace https://kudoai.com
151-
// @version 2025.1.12
151+
// @version 2025.1.12.1
152152
// @license MIT
153153
// @icon https://assets.bravegpt.com/images/icons/bravegpt/icon48.png?v=df624b0
154154
// @icon64 https://assets.bravegpt.com/images/icons/bravegpt/icon64.png?v=df624b0
@@ -785,6 +785,7 @@
785785
open(modalType, modalSubType) { // custom ones
786786
const modal = modalSubType ? modals[modalType][modalSubType]()
787787
: (modals[modalType].show || modals[modalType])()
788+
if (!modal) return // since no div returned
788789
if (settings.controls[modalType]?.type != 'prompt') { // add to stack
789790
this.stack.unshift(modalSubType ? `${modalType}_${modalSubType}` : modalType)
790791
log.debug(`Modal stack: ${JSON.stringify(modals.stack)}`)
@@ -798,7 +799,6 @@
798799
},
799800

800801
init(modal) {
801-
if (!modal) return // to support non-div this.open()s
802802
if (!this.styles) this.stylize() // to init/append stylesheet
803803

804804
// Add classes

0 commit comments

Comments
 (0)