Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Fix Missing Sidebar and New Chat Button in ChatGPT #151

Open
erwiower2 opened this issue Jun 5, 2024 · 2 comments
Open

How to Fix Missing Sidebar and New Chat Button in ChatGPT #151

erwiower2 opened this issue Jun 5, 2024 · 2 comments

Comments

@erwiower2
Copy link

erwiower2 commented Jun 5, 2024

1. Open the file located at /Applications/ChatGPT.app/Contents/Resources/app/index.html

2. Find the following line of code in JavaScript:
.sticky, .pointer-events-auto.flex.border-orange-500, [class*="shared__Capabilities"] { display: none !important; }
3. Change to:

.sticky, .pointer-events-auto.flex.border-orange-500, [class*="shared__Capabilities"] { display: block !important; }

4. Save the changes! (To restart the ChatGPT application via the terminal, execute the following command: killall ChatGPT. Please note that the command is case-sensitive.)

The problem in the JavaScript is that the CSS was set to display: none !important; but it should be display: block !important;

@dingzhenying
Copy link

有效!!!!

@txwq315
Copy link

txwq315 commented Sep 14, 2024

<title>ChatGPT</title>
<script> const webview = document.getElementById('webview'); webview.addEventListener('dom-ready', function () { // Hide specific elements without affecting the sidebar toggle button webview.insertCSS(` .text-xs.text-center { opacity: 0; height: 0; margin-bottom: -10px; }
      /* More specific selectors to avoid hiding the sidebar toggle button */
      .pointer-events-auto.flex.border-orange-500,
      [class*="shared__Capabilities"] {
        display: none !important;
      }

      /* Retaining the sidebar toggle functionality */
      [class*="shared__Wrapper"] {
        align-items: center;
        justify-content: center;
        text-align: center;
        margin-top: 15vh;
      }

      [class*="shared__Wrapper"] h3 {
        margin-top: -40px;
        font-size: 20px;
      }
    `);

    const element = webview.executeJavaScript(`
      document.querySelector("[class*='shared__Wrapper']").innerHTML  = "<h3>Start by asking anything.</h3>";
    `);
  });
</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants