Skip to content

Instantly share code, notes, and snippets.

@letam
Created April 13, 2023 04:58
Show Gist options
  • Save letam/8c3254e69f550df42c0d674c63f7c691 to your computer and use it in GitHub Desktop.
Save letam/8c3254e69f550df42c0d674c63f7c691 to your computer and use it in GitHub Desktop.
Script to modify/cleanup ChatGPT UI for screencasts
// Declare reusable variable
let x;
// Hide Sidebar
document.querySelector('.dark.bg-gray-900').classList.toggle('md:hidden');
// Fix app alignment
document.querySelector('.flex.h-full.flex-1').classList.toggle('md:pl-[260px]')
// Hide model option selector
document.querySelector('.flex.items-center.justify-center').classList.toggle('hidden')
// Hide unecessary Text
let text = 'Plus'
let xpathExpression = `//*[contains(text(), '${text}')]`
let textElement = document.evaluate(xpathExpression, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue
textElement.classList.toggle('hidden')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment