Skip to content

Commit

Permalink
Renamed type arg of observeRemoval() to more readable modalType
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Dec 3, 2024
1 parent 0fe3a8e commit ae460fa
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
// @description:zu Ziba itshala lokucabanga okuzoshintshwa ngokuzenzakalelayo uma ukubuka chatgpt.com
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2024.12.2.3
// @version 2024.12.2.4
// @license MIT
// @icon https://media.autoclearchatgpt.com/images/icons/openai/black/icon48.png?a8868ef
// @icon64 https://media.autoclearchatgpt.com/images/icons/openai/black/icon64.png?a8868ef
Expand Down Expand Up @@ -521,11 +521,11 @@
this.observeRemoval(modal, modalType) // to maintain stack for proper nav
},

observeRemoval(modal, type) { // to maintain stack for proper nav
observeRemoval(modal, modalType) { // to maintain stack for proper nav
const modalBG = modal.parentNode
new MutationObserver(([mutation], obs) => {
mutation.removedNodes.forEach(removedNode => { if (removedNode == modalBG) {
if (modals.stack[0] == type) { // new modal not launched, implement nav back logic
if (modals.stack[0] == modalType) { // new modal not launched, implement nav back logic
modals.stack.shift() // remove this modal type from stack
const prevModalType = modals.stack[0]
if (prevModalType) { // open it
Expand Down

0 comments on commit ae460fa

Please sign in to comment.