Skip to content

Commit

Permalink
Condensed rightBtnSelector init ↞ [auto-sync from https://github.co…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Dec 4, 2024
1 parent e0b15ad commit 3441366
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 @@ -173,8 +173,8 @@
if (env.tallChatbar) btns[btnType].style.bottom = '8.85px'
else btns[btnType].style.top = /chatgpt|openai/.test(env.site) ? '-3.25px' : 0
if (/chatgpt|perplexity/.test(env.site)) { // assign classes + tweak styles
const rightBtnSelector = `${sites[env.site].selectors.btns.send}, ${
sites[env.site].selectors.btns.voice}`
const btnSelectors = sites[env.site].selectors.btns
const rightBtnSelector = `${btnSelectors.send}, ${btnSelectors.voice}`
const rightBtn = await new Promise(resolve => {
const rightBtn = document.querySelector(rightBtnSelector)
if (rightBtn) resolve(rightBtn)
Expand Down
4 changes: 2 additions & 2 deletions firefox/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@
if (env.tallChatbar) btns[btnType].style.bottom = '8.85px'
else btns[btnType].style.top = /chatgpt|openai/.test(env.site) ? '-3.25px' : 0
if (/chatgpt|perplexity/.test(env.site)) { // assign classes + tweak styles
const rightBtnSelector = `${sites[env.site].selectors.btns.send}, ${
sites[env.site].selectors.btns.voice}`
const btnSelectors = sites[env.site].selectors.btns
const rightBtnSelector = `${btnSelectors.send}, ${btnSelectors.voice}`
const rightBtn = await new Promise(resolve => {
const rightBtn = document.querySelector(rightBtnSelector)
if (rightBtn) resolve(rightBtn)
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.4.2
// @version 2024.12.4.3
// @license MIT
// @compatible chrome
// @compatible firefox
Expand Down Expand Up @@ -600,8 +600,8 @@
if (env.tallChatbar) btns[btnType].style.bottom = '8.85px'
else btns[btnType].style.top = /chatgpt|openai/.test(env.site) ? '-3.25px' : 0
if (/chatgpt|openai|perplexity/.test(env.site)) { // assign classes + tweak styles
const rightBtnSelector = `${sites[env.site].selectors.btns.send}, ${
sites[env.site].selectors.btns.voice}`
const btnSelectors = sites[env.site].selectors.btns
const rightBtnSelector = `${btnSelectors.send}, ${btnSelectors.voice}`
const rightBtn = await new Promise(resolve => {
const rightBtn = document.querySelector(rightBtnSelector)
if (rightBtn) resolve(rightBtn)
Expand Down

0 comments on commit 3441366

Please sign in to comment.