File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
chromium/extension/components
firefox/extension/components Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1- // Requires components/buttons.js + lib/<browser|dom>.js + <app|config|env>
1+ // Requires components/buttons.js + lib/<browser|chatgpt| dom>.js + <app|config|env>
22
33window . tooltip = {
44
@@ -25,7 +25,7 @@ window.tooltip = {
2525 tooltip . div . style . opacity = + ( event . type == 'mouseenter' )
2626 } ,
2727
28- update ( btn ) { // requires lib/browser.js + <config|env>
28+ update ( btn ) { // requires lib/< browser|chatgpt> .js + <config|env>
2929 if ( ! this . div ) return
3030 const { site } = env
3131 const btnType = btn . id . replace ( / - b t n $ / , '' )
@@ -37,7 +37,7 @@ window.tooltip = {
3737 this . div . textContent = browserAPI . getMsg ( `tooltip_${ btnType } ${
3838 ! / f u l l | w i d e / i. test ( btnType ) ? '' : ( config [ btnType ] ? 'OFF' : 'ON' ) } `)
3939 this . div . style . left = `${ btnRect . left + ( btnRect . width / 2 ) - ( this . div . offsetWidth / 2 )
40- - ( site == 'chatgpt ' ? 260 : 0 ) } px`
40+ - ( site == 'poe ' ? 0 : chatgpt . sidebar . isOn ( ) ? 260 : 52 ) } px`
4141 this . div . style . top = `${ unscaledTop - this . div . offsetHeight - ( site == 'chatgpt' ? - 75 : /* poe */ 19 ) } px`
4242 }
4343} ;
Original file line number Diff line number Diff line change 1- // Requires components/buttons.js + lib/<browser|dom>.js + <app|config|env>
1+ // Requires components/buttons.js + lib/<browser|chatgpt| dom>.js + <app|config|env>
22
33window . tooltip = {
44
@@ -25,7 +25,7 @@ window.tooltip = {
2525 tooltip . div . style . opacity = + ( event . type == 'mouseenter' )
2626 } ,
2727
28- update ( btn ) { // requires lib/browser.js + <config|env>
28+ update ( btn ) { // requires lib/< browser|chatgpt> .js + <config|env>
2929 if ( ! this . div ) return
3030 const { site } = env
3131 const btnType = btn . id . replace ( / - b t n $ / , '' )
@@ -37,7 +37,7 @@ window.tooltip = {
3737 this . div . textContent = browserAPI . getMsg ( `tooltip_${ btnType } ${
3838 ! / f u l l | w i d e / i. test ( btnType ) ? '' : ( config [ btnType ] ? 'OFF' : 'ON' ) } `)
3939 this . div . style . left = `${ btnRect . left + ( btnRect . width / 2 ) - ( this . div . offsetWidth / 2 )
40- - ( site == 'chatgpt ' ? 260 : 0 ) } px`
40+ - ( site == 'poe ' ? 0 : chatgpt . sidebar . isOn ( ) ? 260 : 52 ) } px`
4141 this . div . style . top = `${ unscaledTop - this . div . offsetHeight - ( site == 'chatgpt' ? - 75 : /* poe */ 19 ) } px`
4242 }
4343} ;
You can’t perform that action at this time.
0 commit comments