Skip to content

Commit 87993ca

Browse files
committed
Changed Regenerate button click to not hide current reply
1 parent 447a148 commit 87993ca

File tree

4 files changed

+58
-20
lines changed

4 files changed

+58
-20
lines changed

amazongpt/greasemonkey/amazongpt.user.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @description Adds the magic of AI to Amazon shopping
44
// @author KudoAI
55
// @namespace https://kudoai.com
6-
// @version 2025.1.15.19
6+
// @version 2025.1.15.20
77
// @license MIT
88
// @icon https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon48.png?v=0fddfc7
99
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon64.png?v=0fddfc7
@@ -2131,7 +2131,7 @@
21312131
replySection.classList.add('loading', 'no-user-select')
21322132
replySection.innerText = app.alerts.waitingResponse
21332133

2134-
// Set flags
2134+
// Reset flags
21352135
show.reply.chatbarFocused = false ; show.reply.userInteracted = true
21362136
}
21372137
}
@@ -2913,9 +2913,15 @@
29132913
regenBtn.append(regenSVG) ; cornerBtnsDiv.append(regenBtn)
29142914
if (!env.browser.isMobile) regenBtn.onmouseenter = regenBtn.onmouseleave = toggle.tooltip
29152915
regenBtn.onclick = () => {
2916-
get.reply(msgChain) ; appAlert('waitingResponse')
2917-
if (!env.browser.isMobile) tooltipDiv.style.opacity = 0 // or tooltip shows on next reply
2918-
show.reply.chatbarFocused = false ; show.reply.userInteracted = true
2916+
get.reply(msgChain) ; regenBtn.style.display = 'none'
2917+
2918+
// Show loading status
2919+
const replySection = appDiv.querySelector('section')
2920+
replySection.classList.add('loading', 'no-user-select')
2921+
replySection.innerText = app.alerts.waitingResponse
2922+
2923+
// Reset flags
2924+
show.reply.src = null ; show.reply.chatbarFocused = false ; show.reply.userInteracted = true
29192925
}
29202926
},
29212927

bravegpt/greasemonkey/bravegpt.user.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
// @description:zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!)
149149
// @author KudoAI
150150
// @namespace https://kudoai.com
151-
// @version 2025.1.15.22
151+
// @version 2025.1.15.23
152152
// @license MIT
153153
// @icon https://assets.bravegpt.com/images/icons/bravegpt/icon48.png?v=df624b0
154154
// @icon64 https://assets.bravegpt.com/images/icons/bravegpt/icon64.png?v=df624b0
@@ -2692,7 +2692,7 @@
26922692
replySection.classList.add('loading', 'no-user-select')
26932693
replySection.innerText = app.alerts.waitingResponse
26942694

2695-
// Set flags
2695+
// Reset flags
26962696
show.reply.src = null ; show.reply.chatbarFocused = false ; show.reply.userInteracted = true
26972697
}
26982698
}
@@ -3644,9 +3644,20 @@
36443644
regenBtn.append(regenSVG) ; cornerBtnsDiv.append(regenBtn)
36453645
if (!env.browser.isMobile) regenBtn.onmouseenter = regenBtn.onmouseleave = toggle.tooltip
36463646
regenBtn.onclick = () => {
3647-
get.reply(msgChain) ; appAlert('waitingResponse')
3648-
if (!env.browser.isMobile) tooltipDiv.style.opacity = 0 // or tooltip shows on next reply
3649-
show.reply.chatbarFocused = false ; show.reply.userInteracted = true
3647+
get.reply(msgChain)
3648+
3649+
// Hide/remove elems
3650+
regenBtn.style.display = 'none'
3651+
appDiv.querySelector(`.${app.cssPrefix}-related-queries`)?.remove()
3652+
appDiv.querySelector('footer').textContent = ''
3653+
3654+
// Show loading status
3655+
const replySection = appDiv.querySelector('section')
3656+
replySection.classList.add('loading', 'no-user-select')
3657+
replySection.innerText = app.alerts.waitingResponse
3658+
3659+
// Reset flags
3660+
show.reply.src = null ; show.reply.chatbarFocused = false ; show.reply.userInteracted = true
36503661
}
36513662
},
36523663

duckduckgpt/greasemonkey/duckduckgpt.user.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
// @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
149149
// @author KudoAI
150150
// @namespace https://kudoai.com
151-
// @version 2025.1.15.23
151+
// @version 2025.1.15.24
152152
// @license MIT
153153
// @icon https://assets.ddgpt.com/images/icons/duckduckgpt/icon48.png?v=06af076
154154
// @icon64 https://assets.ddgpt.com/images/icons/duckduckgpt/icon64.png?v=06af076
@@ -2576,7 +2576,7 @@
25762576
replySection.classList.add('loading', 'no-user-select')
25772577
replySection.innerText = app.alerts.waitingResponse
25782578

2579-
// Set flags
2579+
// Reset flags
25802580
show.reply.src = null ; show.reply.chatbarFocused = false ; show.reply.userInteracted = true
25812581
}
25822582
}
@@ -3528,9 +3528,19 @@
35283528
regenBtn.append(regenSVG) ; cornerBtnsDiv.append(regenBtn)
35293529
if (!env.browser.isMobile) regenBtn.onmouseenter = regenBtn.onmouseleave = toggle.tooltip
35303530
regenBtn.onclick = () => {
3531-
get.reply(msgChain) ; appAlert('waitingResponse')
3532-
if (!env.browser.isMobile) tooltipDiv.style.opacity = 0 // or tooltip shows on next reply
3533-
show.reply.chatbarFocused = false ; show.reply.userInteracted = true
3531+
get.reply(msgChain)
3532+
3533+
// Hide/remove elems
3534+
appDiv.querySelector(`.${app.cssPrefix}-related-queries`)?.remove()
3535+
regenBtn.style.display = 'none'
3536+
3537+
// Show loading status
3538+
const replySection = appDiv.querySelector('section')
3539+
replySection.classList.add('loading', 'no-user-select')
3540+
replySection.innerText = app.alerts.waitingResponse
3541+
3542+
// Reset flags
3543+
show.reply.src = null ; show.reply.chatbarFocused = false ; show.reply.userInteracted = true
35343544
}
35353545
},
35363546

googlegpt/greasemonkey/googlegpt.user.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
150150
// @author KudoAI
151151
// @namespace https://kudoai.com
152-
// @version 2025.1.15.19
152+
// @version 2025.1.15.20
153153
// @license MIT
154154
// @icon https://assets.googlegpt.io/images/icons/googlegpt/black/icon48.png?v=59409b2
155155
// @icon64 https://assets.googlegpt.io/images/icons/googlegpt/black/icon64.png?v=59409b2
@@ -2903,7 +2903,7 @@
29032903
replySection.classList.add('loading', 'no-user-select')
29042904
replySection.innerText = app.alerts.waitingResponse
29052905

2906-
// Set flags
2906+
// Reset flags
29072907
show.reply.src = null ; show.reply.chatbarFocused = false ; show.reply.userInteracted = true
29082908
}
29092909
}
@@ -3864,9 +3864,20 @@
38643864
regenBtn.append(regenSVG) ; cornerBtnsDiv.append(regenBtn)
38653865
if (!env.browser.isMobile) regenBtn.onmouseenter = regenBtn.onmouseleave = toggle.tooltip
38663866
regenBtn.onclick = () => {
3867-
get.reply(msgChain) ; appAlert('waitingResponse')
3868-
if (!env.browser.isMobile) tooltipDiv.style.opacity = 0 // or tooltip shows on next reply
3869-
show.reply.chatbarFocused = false ; show.reply.userInteracted = true
3867+
get.reply(msgChain)
3868+
3869+
// Hide/remove elems
3870+
regenBtn.style.display = 'none'
3871+
appDiv.querySelector(`.${app.cssPrefix}-related-queries`)?.remove()
3872+
appDiv.querySelector('footer').textContent = ''
3873+
3874+
// Show loading status
3875+
const replySection = appDiv.querySelector('section')
3876+
replySection.classList.add('loading', 'no-user-select')
3877+
replySection.innerText = app.alerts.waitingResponse
3878+
3879+
// Reset flags
3880+
show.reply.src = null ; show.reply.chatbarFocused = false ; show.reply.userInteracted = true
38703881
}
38713882
},
38723883

0 commit comments

Comments
 (0)