Skip to content

Commit f73836d

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/chatgpt-auto-refresh]
1 parent 727029e commit f73836d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chatgpt/chatgpt-auto-refresh/chatgpt-auto-refresh.user.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
// @description:zu *NGOKUPHEPHA* susa ukusetha kabusha ingxoxo yemizuzu eyi-10 + amaphutha enethiwekhi ahlala njalo + Ukuhlolwa kwe-Cloudflare ku-ChatGPT.
221221
// @author Adam Lui
222222
// @namespace https://github.com/adamlui
223-
// @version 2025.1.11.1
223+
// @version 2025.1.12
224224
// @license MIT
225225
// @icon https://assets.chatgptautorefresh.com/images/icons/openai/black/icon48.png?v=f11a0a8
226226
// @icon64 https://assets.chatgptautorefresh.com/images/icons/openai/black/icon64.png?v=f11a0a8
@@ -540,6 +540,7 @@
540540
},
541541

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

0 commit comments

Comments
 (0)