Eye in the Cloud - A Google AI Studio Focused Experience

Get focused by hiding the clutter, hide chat history, lag free text box, VIBE Mode, and themes!

< Opiniones de Eye in the Cloud - A Google AI Studio Focused Experience

Puntuación: Bueno; el script funciona tal y como promete

§
Publicado: 01/06/2025

It's really good.
Suggestions, tell me what you think:
- When hiding left side bar : keep new chat and history buttons somewhere
- When hiding right side side bar : keep the model choice menu and a toggle Ground with Google Search
- Add option to send on enter (instead of shift enter)
- For the themes : chose more useable themes, less meme, something softer
- Also add a token counter, here is the code I made that you can include if you want


// ==/UserScript==

(function() {
'use strict';

// --- CSS for the new token count display ---
// Adjusted to be near the bottom right.
const newDisplayCss = `
#my-token-count-display {
position: fixed;
bottom: 60px; /* Distance from the bottom of the viewport */
right: 10px; /* Distance from the right of the viewport */
background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black background */
color: white; /* White text */
padding: 5px 10px; /* Padding inside the box */
border-radius: 4px; /* Rounded corners */
font-family: sans-serif; /* Readable font */
font-size: 14px; /* Font size */
z-index: 10000; /* Ensure it's on top of other elements */
pointer-events: none; /* Allows clicking through the element if needed */
opacity: 0.9; /* Slightly transparent */
text-align: center;
}
`;

// --- CSS to hide the original token count container ---
const hideOriginalCss = `
.token-count-container {
display: none !important;
}
/* Optional: If the "Tokens" label is still visible, uncomment and adjust this */
/* .the-label-element-class {
display: none !important;
} */
`;

// Add the custom CSS to the page
GM_addStyle(newDisplayCss);
GM_addStyle(hideOriginalCss);

// --- Create the new display element ---
const newDisplay = document.createElement('div');
newDisplay.id = 'my-token-count-display';
newDisplay.textContent = 'Tokens: Loading...'; // Initial text while waiting for the element
document.body.appendChild(newDisplay); // Add it to the page body

// --- MutationObserver to wait for the original token count element ---
const waitForElementObserver = new MutationObserver((mutations, observer) => {
// Look for the original token count span element
// The span inside .token-count-container holds the actual number/text
const originalSpan = document.querySelector('.token-count-container span');

if (originalSpan) {
// Found the element! Disconnect this observer.
observer.disconnect();
console.log('AI Studio Token Count Relocator: Original element found.');

// Set the initial token count on the new display
newDisplay.textContent = `Tokens: ${originalSpan.textContent.trim()}`;

// --- MutationObserver to watch for text changes ---
// Now that we have the element, we watch its content for changes.
const textChangeObserver = new MutationObserver(() => {
// Update the new display element whenever the original span's text changes
// We use trim() just in case there's leading/trailing whitespace
newDisplay.textContent = `Tokens: ${originalSpan.textContent.trim()}`;
});

// Start observing the original span element for changes to its character data or children.
textChangeObserver.observe(originalSpan, { characterData: true, childList: true, subtree: true });
console.log('AI Studio Token Count Relocator: Observing original element for text changes.');

}
// If originalSpan is not found, the observer continues watching for DOM changes.
});


// Optional: Add some console logs to confirm the script is running and styles are added
console.log('AI Studio Token Count Relocator: Script started.');
console.log('AI Studio Token Count Relocator: Added custom CSS.');

})();
§
Publicado: 01/06/2025

It's really good.
Suggestions, tell me what you think:
- When hiding left side bar : keep new chat and history buttons somewhere
- When hiding right side side bar : keep the model choice menu and a toggle Ground with Google Search
- Add option to send on enter (instead of shift enter)
- For the themes : chose more useable themes, less meme, something softer

Publicar respuesta

Inicia sesión para responder.

长期地址
遇到问题?请前往 GitHub 提 Issues。