NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
This UserScript enhances the Google Gemini web interface (
gemini.google.com
) by adding a customizable toolbar near the top of the page. This toolbar provides quick access to predefined text snippets, a paste button, and a feature to download the content of an active Gemini "Canvas".
(A screenshot of the toolbar being on the upper border)
myScript.js
will be saved as myScript.js
). If no extension is found, .txt
is used as a default.Install a Userscript Manager:
Ensure you have a userscript manager browser extension installed. Popular choices include:
Install the Script:
Verify Installation:
Visit Gemini:
https://gemini.google.com/
. The toolbar should now appear at the top-center of the page. 🎉You can easily tailor the toolbar buttons and dropdowns to your needs by editing the userscript's code.
1. Customizing Buttons:
Find the `buttonSnippets` array:
```javascript
const buttonSnippets = [
{ label: "Greeting", text: "Hello Gemini!" },
{ label: "Explain", text: "Could you please explain ... in more detail?" },
// Add more button snippets here
// Example: { label: "My Button", text: "My snippet text..." }
];
```
* **Edit:** Change the `label` (what appears on the button) and `text` (what gets inserted).
* **Add:** Copy an existing line `{ label: "...", text: "..." },` and modify it.
* **Remove:** Delete the line corresponding to the button you want to remove.
2. Customizing Dropdowns:
Find the `dropdownConfigurations` array:
```javascript
const dropdownConfigurations = [
{
placeholder: "Actions...", // Text shown before selection
options: [
{ label: "Summarize", text: "Please summarize the following text:\n" },
{ label: "Ideas", text: "Give me 5 ideas for ..." },
// Add more options here: { label: "Option Name", text: "Snippet..." }
]
},
// Add more dropdown objects here
];
```
* **Edit Options:** Modify the `label` and `text` within the `options` array of a specific dropdown.
* **Add Options:** Add more `{ label: "...", text: "..." }` objects to an existing `options` array.
* **Edit Placeholder:** Change the `placeholder` text for a dropdown.
* **Add Dropdowns:** Copy an entire dropdown object `{ placeholder: "...", options: [...] },` and customize it.
* **Remove Dropdowns/Options:** Delete the relevant lines or objects.
3. Customizing Download Behavior (Advanced):
The download functionality relies on specific CSS selectors to find the active Gemini "Canvas" title and its internal "Copy to Clipboard" button. These are defined as constants near the top of the script:
```javascript
const GEMINI_CANVAS_TITLE_TEXT_SELECTOR = "..."; // Identifies the title element of the canvas
const GEMINI_COPY_BUTTON_IN_TOOLBAR_SELECTOR = "..."; // Finds the "Copy" button within the canvas's toolbar
```
If the download feature stops working after a Gemini UI update, these selectors might need to be updated by inspecting the Gemini webpage elements with browser developer tools.
Important: After saving changes to the script in the Tampermonkey editor, you usually need to refresh the Gemini page for the changes to take effect.
This script includes @downloadURL
and @updateURL
metadata pointing to its GitHub location. Userscript managers like Tampermonkey will periodically check for updates. If a new version is found (based on the @version
number), you will be prompted to update (or it may update automatically, depending on your manager's settings).
To ensure you get updates:
@downloadURL
provided in the metadata.If you modify the script yourself and want to manage your own updates via GitHub:
@version
, @downloadURL
, and @updateURL
in your script's metadata to point to the raw file URL in your forked repository.@version
number.GM_addStyle
for compatibility.This userscript is a community-driven effort and is not officially supported by Google. It modifies the Gemini web interface, and future updates to Gemini might break its functionality. Use at your own risk.
The author, Adromir, and contributors are not responsible for any issues or data loss that may arise from using this script.
This project is licensed under the MIT License.
Copyright (c) 2024 Adromir - https://github.com/adromir
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Rating: 0