From 9aac27954142e39ba069be7177ff4fd38b9fc1fc Mon Sep 17 00:00:00 2001 From: kudo-sync-bot Date: Sun, 12 Jan 2025 20:01:10 -0800 Subject: [PATCH] =?UTF-8?q?Moved=20non-div=20check=20from=20`modals.init()?= =?UTF-8?q?`=20to=20`.open()`=20to=20support=20`.observeRemoval()`=20too?= =?UTF-8?q?=20=E2=86=9E=20[auto-sync=20from=20https://github.com/adamlui/a?= =?UTF-8?q?i-web-extensions/tree/main/chatgpt-auto-talk]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chatgpt/chatgpt-auto-talk/chatgpt-auto-talk.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chatgpt/chatgpt-auto-talk/chatgpt-auto-talk.user.js b/chatgpt/chatgpt-auto-talk/chatgpt-auto-talk.user.js index bf63969f3d..1f7de8a3e1 100644 --- a/chatgpt/chatgpt-auto-talk/chatgpt-auto-talk.user.js +++ b/chatgpt/chatgpt-auto-talk/chatgpt-auto-talk.user.js @@ -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 @@ -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