Skip to content

Commit 030f76a

Browse files
committed
Bumped replyBubble.js ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/bravegpt]
1 parent 02692c7 commit 030f76a

1 file changed

Lines changed: 7 additions & 19 deletions

File tree

chatgpt/bravegpt/bravegpt.user.js

Lines changed: 7 additions & 19 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.9.6
151+
// @version 2025.9.6.1
152152
// @license MIT
153153
// @icon https://assets.bravegpt.com/images/icons/app/icon48.png?v=e8ca7c2
154154
// @icon64 https://assets.bravegpt.com/images/icons/app/icon64.png?v=e8ca7c2
@@ -200,7 +200,7 @@
200200
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@f7e2f2d/assets/js/components/chatbot/buttons.js#sha256-Srg5wWTmP3Zv2OkTLEHeX7HKeKjeYnRgdIFhdRJMuik=
201201
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@0329ace/assets/js/components/chatbot/icons.js#sha256-p89CrELJj8rguE8M4IjdMA4CYwX7iid+RNzvX3oOT2A=
202202
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@bfdb063/assets/js/components/chatbot/menus.js#sha256-ZOZBraa/OmK/AKDtJucT9+i5uuq3suasT3kjJl0UBdA=
203-
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@97173cc/assets/js/components/chatbot/replyBubble.js#sha256-sOVj/ESmlNMLCA13w2ZzqP5hVtcnqlQpbY9yvkFWNek=
203+
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@1dfd40d/assets/js/components/chatbot/replyBubble.js#sha256-VsTgaqE8IrQP7ywc7KE9OGL63uLfEO8DdwK2po6CXas=
204204
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@6fd9b53/assets/js/components/chatbot/tooltip.js#sha256-RbmcNuh/DiKIH+Ch2KYrIo48pLAUd/445leqYwBGEXw=
205205
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@bb5451a/assets/js/lib/chatbot/api.js#sha256-nCFc1tcSAfGJT260Sn07YGEczKPrhXdj8UlrKi+ac8M=
206206
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@ecaeb55/assets/js/lib/chatbot/feedback.js#sha256-9Hm3fBS96DtWFdT5VwGDGvwZMpYIRfxGAQRaCGECeqA=
@@ -532,18 +532,6 @@
532532

533533
window.update = {
534534

535-
replyPreMaxHeight() { // for various mode toggles
536-
const replyPre = app.div.querySelector('.reply-pre'),
537-
relatedQueries = app.div.querySelector(`.${app.slug}-related-queries`),
538-
shorterPreHeight = innerHeight - relatedQueries?.offsetHeight - 304,
539-
longerPreHeight = innerHeight - 278
540-
if (replyPre) replyPre.style.maxHeight = (
541-
config.stickySidebar ? (
542-
relatedQueries?.offsetHeight > 0 ? `${shorterPreHeight}px` : `${longerPreHeight}px` )
543-
: config.anchored ? `${ longerPreHeight - ( config.expanded ? 115 : 365 ) }px` : 'none'
544-
)
545-
},
546-
547535
appBottomPos() { app.div.style.bottom = `${ config.minimized ? 48 - app.div.offsetHeight : -32 }px` },
548536

549537
appStyle() { // used in toggle.animations() + update.scheme() + main's app init
@@ -1123,7 +1111,7 @@
11231111

11241112
// Apply changed state to UI
11251113
app.div.classList.toggle('anchored', config.anchored)
1126-
update.rqVisibility() ; update.replyPreMaxHeight() ; update.bylineVisibility()
1114+
update.rqVisibility() ; replyBubble.updateMaxHeight() ; update.bylineVisibility()
11271115
if (modals.settings.get()) { // update visual state of Settings toggle
11281116
const anchorToggle = document.querySelector('[id*=anchor] input')
11291117
if (anchorToggle.checked != config.anchored) modals.settings.toggle.switch(anchorToggle)
@@ -1244,7 +1232,7 @@
12441232
get.related(app.msgChain[app.msgChain.length - 1]?.content || searchQuery)
12451233
.then(queries => show.related(queries))
12461234
.catch(err => { log.error(err.message) ; api.tryNew(get.related) })
1247-
update.replyPreMaxHeight()
1235+
replyBubble.updateMaxHeight()
12481236
feedback.notify(`${app.msgs.menuLabel_relatedQueries} ${menus.toolbar.state.words[+!config.rqDisabled]}`)
12491237
},
12501238

@@ -1261,7 +1249,7 @@
12611249

12621250
// Apply new state to UI
12631251
app.div.classList.toggle(mode, config[configKeyName])
1264-
update.replyPreMaxHeight() ; update.bylineVisibility()
1252+
replyBubble.updateMaxHeight() ; update.bylineVisibility()
12651253
if (mode == 'wider') // toggle icons everywhere
12661254
document.querySelectorAll(`#${app.slug} svg.widescreenTall, #${app.slug} svg.widescreenWide`)
12671255
.forEach(icon => icon.replaceWith(
@@ -1603,7 +1591,7 @@
16031591
}, (idx+1) *50)
16041592
})
16051593

1606-
update.replyPreMaxHeight() ; get.related.replyIsQuestion = null
1594+
replyBubble.updateMaxHeight() ; get.related.replyIsQuestion = null
16071595
}
16081596
},
16091597

@@ -1813,7 +1801,7 @@
18131801
;[replyPre, ...replyPre.querySelectorAll('*')].forEach(elem =>
18141802
renderMathInElement(elem, { delimiters: app.katexDelimiters, throwOnError: false }))
18151803

1816-
if (config.stickySidebar) update.replyPreMaxHeight()
1804+
if (config.stickySidebar) replyBubble.updateMaxHeight()
18171805
saveAppDiv() // to fight Brave mutations
18181806

18191807
// Auto-scroll if active

0 commit comments

Comments
 (0)