Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save ntcho/c318671ea84d190c4c25d975ab414d5e to your computer and use it in GitHub Desktop.
Gemini Non-Pro Model Alert

Gemini Non-Pro Model Alert

A userscript designed to provide a visual cue when the active Google Gemini model is not set to "Pro".

The script continuously monitors the .model-picker-container element on the Gemini web interface. If the selected model text deviates from "Pro", it dynamically injects an orange outline directly into the model picker button. This is useful for users who want to ensure they are always interacting with a specific model tier before submitting a prompt.

How it works

  • Target Element: Monitors .model-picker-container using a MutationObserver.
  • Condition: Checks if the innerText of the container does not equal "Pro".
  • Action: Applies inline CSS (outline and outline-offset) to the child button element to highlight it.

Installation

Add the provided .user.js file to your userscript manager (e.g., Tampermonkey, Violentmonkey). It is configured to run automatically on https://gemini.google.com/*.

// ==UserScript==
// @name Gemini Non-Pro Model Alert
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Adds an outline to the model picker button when the selected model is not "Pro"
// @match https://gemini.google.com/*
// @updateURL https://gist.githubusercontent.com/ntcho/c318671ea84d190c4c25d975ab414d5e/raw/gemini-model-alert.user.js
// @grant none
// ==/UserScript==
(function() {
'use strict';
const checkAndStyleModelPicker = () => {
const container = document.querySelector('.model-picker-container');
if (container) {
const button = container.querySelector('button');
if (button) {
// Using trim() to safely account for surrounding whitespace
if (container.innerText.trim() !== 'Pro') {
button.style.outline = '2px solid #F4511E55';
button.style.outlineOffset = '-2px';
} else {
// Revert styles if the model is Pro
button.style.outline = '';
button.style.outlineOffset = '';
}
}
}
};
// Execute initially
checkAndStyleModelPicker();
// Create a MutationObserver to watch for DOM updates
const observer = new MutationObserver(() => {
checkAndStyleModelPicker();
});
// Observe the body for dynamic changes
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