A userscript that automatically expands the "Show thinking" panel in Google Gemini chat when it appears, providing seamless access to AI reasoning without manual interaction.
- Automatic Expansion: Instantly expands "Show thinking" panels as they appear in Gemini conversations
- Intelligent Detection: Uses DOM mutation observers to detect dynamically loaded content
- Non-Intrusive: Lightweight script that runs only when needed
- A userscript manager browser extension:
- Tampermonkey (Chrome, Firefox, Safari, Edge)
- Greasemonkey (Firefox)
- Violentmonkey (Chrome, Firefox, Edge)
- Install a userscript manager (see requirements above)
- Click this link to install: gemini-auto-expand-thought.user.js
- Your userscript manager will prompt you to install the script
- Click "Install" to confirm
- Copy the contents of
gemini-auto-expand-thought.user.js
- Open your userscript manager dashboard
- Create a new script and paste the code
- Save the script
Once installed, the script works automatically:
- Navigate to Google Gemini
- Start a conversation that triggers Gemini's thinking process
- When "Show thinking" panels appear, they will be automatically expanded
- No manual interaction required!
The script employs two main strategies:
- Initial Scan: Checks for existing "Show thinking" buttons when the page loads
- Dynamic Monitoring: Uses
MutationObserver
to watch for new content and automatically expand thinking panels as they appear
The script specifically targets:
- Elements with the
model-thoughts
tag - Buttons with
data-test-id="thoughts-header-button"
- Icons with
data-mat-icon-name="expand_more"
(indicating collapsed state)
Contributions are welcome! Please feel free to:
- Report bugs by opening an issue
- Suggest new features
- Submit pull requests
This project is licensed under the MIT License - see the LICENSE file for details.