Skip to content

Instantly share code, notes, and snippets.

@ntcho
Last active March 9, 2026 18:06
Show Gist options
  • Select an option

  • Save ntcho/1ead6eb3162faba20b75e2e2a2ee8e55 to your computer and use it in GitHub Desktop.

Select an option

Save ntcho/1ead6eb3162faba20b75e2e2a2ee8e55 to your computer and use it in GitHub Desktop.
Gemini Title Updater

Gemini Title Updater

A userscript that dynamically updates the browser tab and window title to match the active conversation in Google Gemini.

By default, the Gemini web interface does not consistently reflect the specific conversation name in the document title. This script continuously monitors the DOM for the .gds-title-m element and updates the page title to the format: [Conversation Title] | Gemini.

Use Cases

  • Identifiable Tabs: Easily distinguish between multiple active Gemini conversations in your browser.
  • Productivity Tracking: Enables time-tracking and productivity logging tools that rely on window titles (such as Chronoid, ActivityWatch, or RescueTime) to accurately categorize and record the specific tasks you are working on.

Installation

Add the provided .user.js file to your preferred userscript manager (Tampermonkey, Violentmonkey, etc.). The script is configured to match and run automatically on https://gemini.google.com/*.

// ==UserScript==
// @name Gemini Title Updater
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Updates the page title based on the .gds-title-m element
// @match https://gemini.google.com/*
// @updateURL https://gist.githubusercontent.com/ntcho/1ead6eb3162faba20b75e2e2a2ee8e55/raw/gemini-title-updater.user.js
// @grant none
// ==/UserScript==
(function() {
'use strict';
const updateTitle = () => {
const titleElement = document.querySelector('.gds-title-m');
if (titleElement && titleElement.innerText) {
const newTitle = `${titleElement.innerText.trim()} | Gemini`;
// Only update if the title is actually different to prevent unnecessary DOM writes
if (document.title !== newTitle) {
document.title = newTitle;
}
}
};
// Execute once initially in case the element is already present on load
updateTitle();
// Create a MutationObserver to watch for changes in the DOM
const observer = new MutationObserver(() => {
updateTitle();
});
// Observe the body for added/removed nodes and text changes within the subtree
observer.observe(document.body, {
childList: true,
subtree: true,
characterData: true
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment