Skip to content

Instantly share code, notes, and snippets.

@banagale
Last active September 29, 2023 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save banagale/d426138eb5d1b5a444c24ee646fe6e25 to your computer and use it in GitHub Desktop.
Save banagale/d426138eb5d1b5a444c24ee646fe6e25 to your computer and use it in GitHub Desktop.
Widen chatgpt output column to full width
// 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