Last active
September 29, 2023 17:34
-
-
Save banagale/d426138eb5d1b5a444c24ee646fe6e25 to your computer and use it in GitHub Desktop.
Widen chatgpt output column to full width
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run this in console, keeps hideable left nav column chat history in place. | |
// "Works" as of 9/29/23 | |
function updateClassName(element) { | |
if (element.className === 'flex flex-1 gap-4 text-base mx-auto md:gap-6 gizmo:gap-3 gizmo:md:px-5 gizmo:lg:px-1 gizmo:xl:px-5 md:max-w-3xl }') { | |
element.className = 'flex flex-1 gap-4 text-base mx-auto md:gap-6 gizmo:gap-3 gizmo:md:px-5 gizmo:lg:px-1 gizmo:xl:px-5 md:max-w-5xl }'; | |
} | |
} | |
// Find the parent div first | |
const parentDivs = document.querySelectorAll('div.p-4.justify-center.text-base.md\\:gap-6.md\\:py-6.m-auto'); | |
// Loop through all matching parent divs (though there's likely just one) | |
parentDivs.forEach((parentDiv) => { | |
// Now find the specific child div within this parent | |
const childDivs = parentDiv.querySelectorAll('div'); | |
childDivs.forEach(updateClassName); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment