Skip to content

Commit d759759

Browse files
committed
Updated ChatGPT tooltip x-pos (fixes adamlui/chatgpt-widescreen#213)
1 parent d9cfd39 commit d759759

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

chatgpt-widescreen/chromium/extension/components/tooltip.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ window.tooltip = {
3636
const unscaledTop = btnRect.top +( btnRect.height - btnRect.height / btnScale )/2
3737
this.div.textContent = browserAPI.getMsg(`tooltip_${btnType}${
3838
!/full|wide/i.test(btnType) ? '' : (config[btnType] ? 'OFF' : 'ON')}`)
39-
this.div.style.left = `${ btnRect.left +( btnRect.width /2 ) -( this.div.offsetWidth /2 )}px`
39+
this.div.style.left = `${ btnRect.left +( btnRect.width /2 ) -( this.div.offsetWidth /2 )
40+
-( site == 'chatgpt' ? 260 : 0 )}px`
4041
this.div.style.top = `${ unscaledTop - this.div.offsetHeight -( site == 'chatgpt' ? -75 : /* poe */ 19 )}px`
4142
}
4243
};

chatgpt-widescreen/firefox/extension/components/tooltip.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ window.tooltip = {
3636
const unscaledTop = btnRect.top +( btnRect.height - btnRect.height / btnScale )/2
3737
this.div.textContent = browserAPI.getMsg(`tooltip_${btnType}${
3838
!/full|wide/i.test(btnType) ? '' : (config[btnType] ? 'OFF' : 'ON')}`)
39-
this.div.style.left = `${ btnRect.left +( btnRect.width /2 ) -( this.div.offsetWidth /2 )}px`
39+
this.div.style.left = `${ btnRect.left +( btnRect.width /2 ) -( this.div.offsetWidth /2 )
40+
-( site == 'chatgpt' ? 260 : 0 )}px`
4041
this.div.style.top = `${ unscaledTop - this.div.offsetHeight -( site == 'chatgpt' ? -75 : /* poe */ 19 )}px`
4142
}
4243
};

0 commit comments

Comments
 (0)