Skip to content

Commit f7b94d2

Browse files
committed
Added early return to modals.init() if modal undefined to support non-div .open()s ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/autoclear-chatgpt-history]
1 parent f1283b0 commit f7b94d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chatgpt/autoclear-chatgpt-history/autoclear-chatgpt-history.user.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
// @description:zu Ziba itshala lokucabanga okuzoshintshwa ngokuzenzakalelayo uma ukubuka chatgpt.com
226226
// @author Adam Lui
227227
// @namespace https://github.com/adamlui
228-
// @version 2025.1.11.1
228+
// @version 2025.1.12
229229
// @license MIT
230230
// @icon https://assets.autoclearchatgpt.com/images/icons/openai/black/icon48.png?v=f461c06
231231
// @icon64 https://assets.autoclearchatgpt.com/images/icons/openai/black/icon64.png?v=f461c06
@@ -503,6 +503,7 @@
503503
},
504504

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

0 commit comments

Comments
 (0)