Skip to content

Commit

Permalink
Updated perplexity.ai tooltip ctrAddend + spreadFactor to maintai…
Browse files Browse the repository at this point in the history
…n centeredness ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions]
  • Loading branch information
kudo-sync-bot committed Dec 10, 2024
1 parent 38e4cbb commit ce8d6f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions chrome/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@

tooltip(btnType) { // text & position
const visibleBtnTypes = btns.types.filter(type => !(type == 'fullWindow' && !sites[env.site].hasSidebar))
const ctrAddend = ( env.site == 'perplexity' ? ( location.pathname == '/' ? 100 : 106 )
const ctrAddend = ( env.site == 'perplexity' ? ( location.pathname == '/' ? 94 : 105 )
: env.site == 'poe' ? 45 : 13 ) +25,
spreadFactor = env.site == 'perplexity' ? 26.85 : env.site == 'poe' ? 34 : 30.55,
spreadFactor = env.site == 'perplexity' ? 26.5 : env.site == 'poe' ? 34 : 30.55,
iniRoffset = spreadFactor * ( visibleBtnTypes.indexOf(btnType) +1 ) + ctrAddend
+ ( env.tallChatbar ? -3 : 4 )
tooltipDiv.innerText = chrome.i18n.getMessage('tooltip_' + btnType + (
Expand Down
4 changes: 2 additions & 2 deletions firefox/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@

tooltip(btnType) { // text & position
const visibleBtnTypes = btns.types.filter(type => !(type == 'fullWindow' && !sites[env.site].hasSidebar))
const ctrAddend = ( env.site == 'perplexity' ? ( location.pathname == '/' ? 100 : 106 )
const ctrAddend = ( env.site == 'perplexity' ? ( location.pathname == '/' ? 94 : 105 )
: env.site == 'poe' ? 45 : 13 ) +25,
spreadFactor = env.site == 'perplexity' ? 26.85 : env.site == 'poe' ? 34 : 30.55,
spreadFactor = env.site == 'perplexity' ? 26.5 : env.site == 'poe' ? 34 : 30.55,
iniRoffset = spreadFactor * ( visibleBtnTypes.indexOf(btnType) +1 ) + ctrAddend
+ ( env.tallChatbar ? -3 : 4 )
tooltipDiv.innerText = chrome.i18n.getMessage('tooltip_' + btnType + (
Expand Down
6 changes: 3 additions & 3 deletions greasemonkey/chatgpt-widescreen-mode.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
// @description:zu Yengeza Isikrini Esibanzi + Izindlela Zesikrini Esigcwele ku-chatgpt.com + perplexity.ai + poe.com ukuze uthole ukubuka okuthuthukisiwe + okuncishisiwe ukuskrola
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2024.12.9.3
// @version 2024.12.9.4
// @license MIT
// @icon https://media.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon48.png?9a393be
// @icon64 https://media.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon64.png?9a393be
Expand Down Expand Up @@ -770,9 +770,9 @@

tooltip(btnType) { // text & position
const visibleBtnTypes = btns.types.filter(type => !(type == 'fullWindow' && !sites[env.site].hasSidebar))
const ctrAddend = ( env.site == 'perplexity' ? ( location.pathname == '/' ? 100 : 106 )
const ctrAddend = ( env.site == 'perplexity' ? ( location.pathname == '/' ? 94 : 105 )
: env.site == 'poe' ? 45 : 13 ) +25,
spreadFactor = env.site == 'perplexity' ? 26.85 : env.site == 'poe' ? 34 : 30.55,
spreadFactor = env.site == 'perplexity' ? 26.5 : env.site == 'poe' ? 34 : 30.55,
iniRoffset = spreadFactor * ( visibleBtnTypes.indexOf(btnType) +1 ) + ctrAddend
+ ( env.tallChatbar ? -3 : 4 )
tooltipDiv.innerText = app.msgs['tooltip_' + btnType + (
Expand Down

0 comments on commit ce8d6f7

Please sign in to comment.