Skip to content

Commit

Permalink
Updated parentToInsertInto in insertToggle() ↞ [auto-sync from `a…
Browse files Browse the repository at this point in the history
…damlui/chatgpt-apps/autoclear-chatgpt-history`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Jul 17, 2024
1 parent 60a2cf7 commit fa4486f
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
// @description:zu Ziba itshala lokucabanga okuzoshintshwa ngokuzenzakalelayo uma ukubuka chatgpt.com
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2024.7.17
// @version 2024.7.17.1
// @license MIT
// @icon https://media.autoclearchatgpt.com/images/icons/openai/black/icon48.png?a8868ef
// @icon64 https://media.autoclearchatgpt.com/images/icons/openai/black/icon64.png?a8868ef
Expand Down Expand Up @@ -560,11 +560,9 @@
async function insertToggle() {

// Insert toggle
const parentToInsertInto = document.querySelector('nav ' +
(isGPT4oUI ? '' // nav div itself
: '> div:not(.invisible)')) // upper nav div
const parentToInsertInto = document.querySelector('nav > div:nth-of-type(2)') // upper nav div
if (!parentToInsertInto.contains(navToggleDiv))
parentToInsertInto.insertBefore(navToggleDiv, parentToInsertInto.children[1])
parentToInsertInto.insertBefore(navToggleDiv, parentToInsertInto.children[1])

// Tweak styles
if (isGPT4oUI) navToggleDiv.style.flexGrow = 'unset' // overcome OpenAI .grow
Expand Down

0 comments on commit fa4486f

Please sign in to comment.