Skip to content

Commit

Permalink
Moved balloon tip pos from appStyle to appShow()
Browse files Browse the repository at this point in the history
... to accomodate Chromium delay ↞ [auto-sync from `adamlui/chatgpt-apps`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed May 30, 2024
1 parent d855558 commit 989e3d5
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions greasemonkey/duckduckgpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
// @description:zu Faka amaphawu ase-ChatGPT kuvaliwe i-DuckDuckGo Search (okwesikhashana ngu-GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.5.30
// @version 2024.5.30.1
// @license MIT
// @icon https://media.ddgpt.com/images/icons/duckduckgpt/icon48.png?af89302
// @icon64 https://media.ddgpt.com/images/icons/duckduckgpt/icon64.png?af89302
Expand Down Expand Up @@ -492,11 +492,8 @@
+ '.ddgpt + footer { margin: 2px 0 25px }'
+ `.ddgpt + footer * { color: ${ scheme == 'dark' ? '#ccc' : '#666' } !important }`
+ '.balloon-tip { content: "" ; position: relative ; border: 7px solid transparent ;'
+ `top: ${ isFirefox ? '0.55em' : '4px' } ;`
+ `right: ${ isFirefox ? ( 16.87 - ( appLogoImg.loaded ? 0 : 0.36 ))
: ( 8.38 - ( appLogoImg.loaded ? 0 : 0.15 ))}em ;`
+ 'border-bottom-style: solid ; border-bottom-width: 1.19rem ; border-top: 0 ; border-bottom-color: '
+ ( scheme == 'dark' ? '#3a3a3a' : '#eaeaea' ) + ' } '
+ ( scheme == 'dark' ? '#3a3a3a' : '#eaeaea' ) + '}'
+ '.continue-chat > textarea {'
+ `border: solid 1px ${ scheme == 'dark' ? '#aaa' : '#638ed4' } ; border-radius: 12px 13px 12px 0 ;`
+ 'font-size: 0.92rem ; height: 1.55rem ; width: 94.6% ; max-height: 200px ; resize: none ; '
Expand Down Expand Up @@ -1100,7 +1097,13 @@
} else {
const balloonTipSpan = document.createElement('span')
var answerPre = document.createElement('pre')
balloonTipSpan.className = 'balloon-tip' ; answerPre.textContent = answer
balloonTipSpan.className = 'balloon-tip'
balloonTipSpan.style.cssText = ( // pos it
`top: ${ isFirefox ? '0.55em' : '4px' } ;`
+ `right: ${ isFirefox ? ( 16.87 - ( appLogoImg.loaded ? 0 : 0.36 ))
: ( 8.38 - ( appLogoImg.loaded ? 0 : 0.15 ))}em`
)
answerPre.textContent = answer
appDiv.append(balloonTipSpan) ; appDiv.append(answerPre)
}

Expand Down

0 comments on commit 989e3d5

Please sign in to comment.