Skip to content

Commit

Permalink
Added return if byline missing to update.bylineVisibility() for cle…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Jan 15, 2025
1 parent b903cf4 commit b893086
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions chatgpt/bravegpt/bravegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2025.1.15
// @version 2025.1.15.1
// @license MIT
// @icon https://assets.bravegpt.com/images/icons/bravegpt/icon48.png?v=df624b0
// @icon64 https://assets.bravegpt.com/images/icons/bravegpt/icon64.png?v=df624b0
Expand Down Expand Up @@ -2365,15 +2365,18 @@

bylineVisibility() {
if (env.browser.isPhone) return // since byline hidden by app.styles
const headerElems = {

// Init header elems
const headerElems = { byline: appDiv.querySelector('.kudoai') }
if (!headerElems.byline) return // since in loading state
Object.assign(headerElems, {
btns: appDiv.querySelectorAll('[id$=-header-btns] > btn'),
byline: appDiv.querySelector('.kudoai'),
logo: appDiv.querySelector(`#${app.cssPrefix}-logo`)
}
const appDivStyle = getComputedStyle(appDiv)
const forceDisplayStyles = 'position: absolute; visibility: hidden; display: block;'
})

// Calc/store widths of app/x-padding + header elems
const appDivStyle = getComputedStyle(appDiv)
const forceDisplayStyles = 'position: absolute; visibility: hidden; display: block;'
const widths = {
appDiv: appDiv.getBoundingClientRect().width,
appDivXpadding: parseFloat(appDivStyle.paddingLeft) + parseFloat(appDivStyle.paddingRight)
Expand Down

0 comments on commit b893086

Please sign in to comment.