Skip to content

Commit

Permalink
Fixed buttons don't re-insert when nav'ing to/from new GPTs page (#11…
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed Dec 3, 2024
1 parent 5e33031 commit 0e99520
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion chatgpt-widescreen/chrome/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@
} else if (canvasWasOpen && !chatgpt.canvasIsOpen()) {
btns.insert() ; chatbar.tweak() ; canvasWasOpen = false }
}
if (!document.getElementById('wideScreen-btn') && btns.status != 'inserting') {
if (!document.getElementById('wideScreen-btn') && chatbar.get() && btns.status != 'inserting') {
btns.status = 'missing' ; btns.insert() }
if (env.site == 'chatgpt') { // Update button colors on ChatGPT scheme or temp chat toggle
const chatbarIsBlack = !!document.querySelector('div[class*="bg-black"]:not([id$="-btn"])')
Expand Down
2 changes: 1 addition & 1 deletion chatgpt-widescreen/firefox/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@
} else if (canvasWasOpen && !chatgpt.canvasIsOpen()) {
btns.insert() ; chatbar.tweak() ; canvasWasOpen = false }
}
if (!document.getElementById('wideScreen-btn') && btns.status != 'inserting') {
if (!document.getElementById('wideScreen-btn') && chatbar.get() && btns.status != 'inserting') {
btns.status = 'missing' ; btns.insert() }
if (env.site == 'chatgpt') { // Update button colors on ChatGPT scheme or temp chat toggle
const chatbarIsBlack = !!document.querySelector('div[class*="bg-black"]:not([id$="-btn"])')
Expand Down
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.3.1
// @version 2024.12.3.2
// @license MIT
// @compatible chrome
// @compatible firefox
Expand Down Expand Up @@ -1014,7 +1014,7 @@
} else if (canvasWasOpen && !chatgpt.canvasIsOpen()) {
btns.insert() ; chatbar.tweak() ; canvasWasOpen = false }
}
if (!document.getElementById('wideScreen-btn') && btns.status != 'inserting') {
if (!document.getElementById('wideScreen-btn') && chatbar.get() && btns.status != 'inserting') {
btns.status = 'missing' ; btns.insert() }
if (/chatgpt|openai/.test(env.site)) { // Update button colors on ChatGPT scheme or temp chat toggle
const chatbarIsBlack = !!document.querySelector('div[class*="bg-black"]:not([id$="-btn"])')
Expand Down

0 comments on commit 0e99520

Please sign in to comment.