Skip to content

Commit

Permalink
Converted buttons to divs to avoid submit behavior on chatgpt.com + p…
Browse files Browse the repository at this point in the history
…otential issues on added sites/changes ↞ [auto-sync from `adamlui/chatgpt-apps/chatgpt-widescreen/greasemonkey`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Sep 21, 2024
1 parent 3af3c57 commit 6223e79
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions chrome/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@
.filter(type => !(type == 'fullWindow' && !sites[site].hasSidebar))
const bOffset = site == 'poe' ? -1.5 : -13, rOffset = site == 'poe' ? -6 : -4
validBtnTypes.forEach(async (btnType, idx) => {
btns[btnType] = document.createElement(site == 'poe' ? 'div' // create div to avoid Poe button styles
: 'button') // create button elsewhere
btns[btnType] = document.createElement('div')
btns[btnType].id = btnType + '-btn' // for toggle.tooltip()
btns.updateSVG(btnType) // insert icon
btns[btnType].style.cssText = 'position: relative ; top: 0 ;'
Expand Down
3 changes: 1 addition & 2 deletions edge/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@
.filter(type => !(type == 'fullWindow' && !sites[site].hasSidebar))
const bOffset = site == 'poe' ? -1.5 : -13, rOffset = site == 'poe' ? -6 : -4
validBtnTypes.forEach(async (btnType, idx) => {
btns[btnType] = document.createElement(site == 'poe' ? 'div' // create div to avoid Poe button styles
: 'button') // create button elsewhere
btns[btnType] = document.createElement('div')
btns[btnType].id = btnType + '-btn' // for toggle.tooltip()
btns.updateSVG(btnType) // insert icon
btns[btnType].style.cssText = 'position: relative ; top: 0 ;'
Expand Down
5 changes: 2 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.21.7
// @version 2024.9.21.8
// @license MIT
// @compatible chrome
// @compatible firefox
Expand Down Expand Up @@ -691,8 +691,7 @@
.filter(type => !(type == 'fullWindow' && !sites[site].hasSidebar))
const bOffset = site == 'poe' ? -1.5 : -13, rOffset = site == 'poe' ? -6 : -4
validBtnTypes.forEach(async (btnType, idx) => {
btns[btnType] = document.createElement(site == 'poe' ? 'div' // create div to avoid Poe button styles
: 'button') // create button elsewhere
btns[btnType] = document.createElement('div')
btns[btnType].id = btnType + '-btn' // for toggle.tooltip()
btns.updateSVG(btnType) // insert icon
btns[btnType].style.cssText = 'position: relative ; top: 0 ;'
Expand Down
3 changes: 1 addition & 2 deletions opera/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@
.filter(type => !(type == 'fullWindow' && !sites[site].hasSidebar))
const bOffset = site == 'poe' ? -1.5 : -13, rOffset = site == 'poe' ? -6 : -4
validBtnTypes.forEach(async (btnType, idx) => {
btns[btnType] = document.createElement(site == 'poe' ? 'div' // create div to avoid Poe button styles
: 'button') // create button elsewhere
btns[btnType] = document.createElement('div')
btns[btnType].id = btnType + '-btn' // for toggle.tooltip()
btns.updateSVG(btnType) // insert icon
btns[btnType].style.cssText = 'position: relative ; top: 0 ;'
Expand Down

0 comments on commit 6223e79

Please sign in to comment.