Skip to content

Commit

Permalink
Hid tooltip on New Chat button clicks ↞ [auto-sync from `adamlui/chat…
Browse files Browse the repository at this point in the history
…gpt-apps/chatgpt-widescreen/chrome`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Sep 30, 2024
1 parent df8a15a commit 39e6647
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
5 changes: 3 additions & 2 deletions chrome/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@
// Add hover/click listeners
btns[btnType].onmouseover = btns[btnType].onmouseout = toggle.tooltip
btns[btnType].onclick = () => {
if (btnType == 'newChat')
if (btnType == 'newChat') {
document.querySelector(sites[site].selectors.btns.newChat)?.click()
else toggle.mode(btnType)
tooltipDiv.style.opacity = 0
} else toggle.mode(btnType)
}
})
btns.updateColor()
Expand Down
5 changes: 3 additions & 2 deletions edge/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@
// Add hover/click listeners
btns[btnType].onmouseover = btns[btnType].onmouseout = toggle.tooltip
btns[btnType].onclick = () => {
if (btnType == 'newChat')
if (btnType == 'newChat') {
document.querySelector(sites[site].selectors.btns.newChat)?.click()
else toggle.mode(btnType)
tooltipDiv.style.opacity = 0
} else toggle.mode(btnType)
}
})
btns.updateColor()
Expand Down
7 changes: 4 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 Engeza izinhlobo zezimodi ze-Widescreen + Fullscreen ku-ChatGPT ukuze kube nokubonakala + ukuncitsha ukusukela
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2024.9.30.3
// @version 2024.9.30.4
// @license MIT
// @compatible chrome
// @compatible firefox
Expand Down Expand Up @@ -726,9 +726,10 @@
// Add hover/click listeners
btns[btnType].onmouseover = btns[btnType].onmouseout = toggle.tooltip
btns[btnType].onclick = () => {
if (btnType == 'newChat')
if (btnType == 'newChat') {
document.querySelector(sites[site].selectors.btns.newChat)?.click()
else toggle.mode(btnType)
tooltipDiv.style.opacity = 0
} else toggle.mode(btnType)
}
})
btns.updateColor()
Expand Down
5 changes: 3 additions & 2 deletions opera/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@
// Add hover/click listeners
btns[btnType].onmouseover = btns[btnType].onmouseout = toggle.tooltip
btns[btnType].onclick = () => {
if (btnType == 'newChat')
if (btnType == 'newChat') {
document.querySelector(sites[site].selectors.btns.newChat)?.click()
else toggle.mode(btnType)
tooltipDiv.style.opacity = 0
} else toggle.mode(btnType)
}
})
btns.updateColor()
Expand Down

0 comments on commit 39e6647

Please sign in to comment.