Skip to content

Commit

Permalink
Changed Regenerate button click to not hide current reply ↞ [auto-syn…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Jan 16, 2025
1 parent d818062 commit 5a2f263
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions chatgpt/googlegpt/googlegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2025.1.15.19
// @version 2025.1.15.20
// @license MIT
// @icon https://assets.googlegpt.io/images/icons/googlegpt/black/icon48.png?v=59409b2
// @icon64 https://assets.googlegpt.io/images/icons/googlegpt/black/icon64.png?v=59409b2
Expand Down Expand Up @@ -2903,7 +2903,7 @@
replySection.classList.add('loading', 'no-user-select')
replySection.innerText = app.alerts.waitingResponse

// Set flags
// Reset flags
show.reply.src = null ; show.reply.chatbarFocused = false ; show.reply.userInteracted = true
}
}
Expand Down Expand Up @@ -3864,9 +3864,20 @@
regenBtn.append(regenSVG) ; cornerBtnsDiv.append(regenBtn)
if (!env.browser.isMobile) regenBtn.onmouseenter = regenBtn.onmouseleave = toggle.tooltip
regenBtn.onclick = () => {
get.reply(msgChain) ; appAlert('waitingResponse')
if (!env.browser.isMobile) tooltipDiv.style.opacity = 0 // or tooltip shows on next reply
show.reply.chatbarFocused = false ; show.reply.userInteracted = true
get.reply(msgChain)

// Hide/remove elems
regenBtn.style.display = 'none'
appDiv.querySelector(`.${app.cssPrefix}-related-queries`)?.remove()
appDiv.querySelector('footer').textContent = ''

// Show loading status
const replySection = appDiv.querySelector('section')
replySection.classList.add('loading', 'no-user-select')
replySection.innerText = app.alerts.waitingResponse

// Reset flags
show.reply.src = null ; show.reply.chatbarFocused = false ; show.reply.userInteracted = true
}
},

Expand Down

0 comments on commit 5a2f263

Please sign in to comment.