<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>productivity on Marcin Zabłocki blog</title>
    <link>https://zablo.net/tags/productivity/</link>
    <description>Recent content in productivity on Marcin Zabłocki blog</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <managingEditor>Marcin Zabłocki</managingEditor>
    <webMaster>Marcin Zabłocki</webMaster>
    <copyright>2026 Marcin Zabłocki</copyright>
    <lastBuildDate>Sat, 14 Nov 2026 12:00:00 +0000</lastBuildDate>
    <atom:link href="https://zablo.net/tags/productivity/index.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>How to use Gemini as a search engine in Chrome, Edge and Chromium address bar</title>
      <link>https://zablo.net/blog/post/gemini-search-engine-chrome-edge-address-bar-shortcut/</link>
      <pubDate>Sat, 14 Nov 2026 12:00:00 +0000</pubDate>
      <author>Marcin Zabłocki</author>
      <guid>https://zablo.net/blog/post/gemini-search-engine-chrome-edge-address-bar-shortcut/</guid>
      <category>gemini</category>
      <category>chrome</category>
      <category>edge</category>
      <category>chromium</category>
      <category>userscript</category>
      <category>violentmonkey</category>
      <category>javascript</category>
      <category>productivity</category>
      <description>&lt;p&gt;You type &lt;code&gt;gg&lt;/code&gt;, press &lt;kbd&gt;Tab&lt;/kbd&gt;, write your question in the address bar, hit &lt;kbd&gt;Enter&lt;/kbd&gt; and Gemini opens with your prompt &lt;strong&gt;already sent&lt;/strong&gt;. That&amp;rsquo;s what this post sets up. It works in Chrome, Edge, Chromium, Brave and Vivaldi, and it takes about 5 minutes.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve recently started using Gemini and I was surprised that I could not simply add &lt;code&gt;gemini.google.com&lt;/code&gt; as a search engine in my browser. With ChatGPT or Perplexity it&amp;rsquo;s a one-liner. With Gemini you put &lt;code&gt;?q=&lt;/code&gt; in the URL, Gemini opens&amp;hellip; and ignores it. Empty chat. So I fixed it with a short userscript.&lt;/p&gt;&#xA;&lt;h2 id=&#34;sounds-familiar&#34;&gt;Sounds familiar?&lt;/h2&gt;&#xA;&lt;p&gt;If you ended up here, you have probably asked (or googled) one of these:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;How do I add Gemini as a search engine in Chrome?&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Can I set Gemini as the default search engine in Microsoft Edge?&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Is there a Gemini URL parameter to pass a prompt, like &lt;code&gt;chatgpt.com/?q=&lt;/code&gt;?&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Why does &lt;code&gt;gemini.google.com/app?q=hello&lt;/code&gt; open an empty chat?&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;How do I search Gemini directly from the address bar (omnibox)?&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Chrome has &lt;code&gt;@gemini&lt;/code&gt;, why can&amp;rsquo;t I have the same in Edge / Brave / Vivaldi?&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Short answers: Gemini has no public URL parameter for prompts, so a custom search engine alone is not enough. You need a tiny bit of JavaScript running on the Gemini page that reads the prompt from the URL, types it into the chat box and presses send. Read on.&lt;/p&gt;&#xA;&lt;h2 id=&#34;quick-solution-summary&#34;&gt;Quick solution summary&lt;/h2&gt;&#xA;&lt;p&gt;If you just want the steps:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Install a userscript manager: &lt;a href=&#34;https://violentmonkey.github.io/&#34;&gt;Violentmonkey&lt;/a&gt; (or Tampermonkey).&lt;/li&gt;&#xA;&lt;li&gt;Add &lt;a href=&#34;https://gist.github.com/marrrcin/6b405e660f0ad838a42c916522f09dbb&#34;&gt;this userscript&lt;/a&gt; to it.&lt;/li&gt;&#xA;&lt;li&gt;In your browser, add a site search with the URL &lt;code&gt;https://gemini.google.com/app?prompt=%s&lt;/code&gt; and the shortcut &lt;code&gt;gg&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Type &lt;code&gt;gg&lt;/code&gt; → &lt;kbd&gt;Tab&lt;/kbd&gt; → your prompt → &lt;kbd&gt;Enter&lt;/kbd&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;div class=&#34;yellow-blockquote&#34;&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;💡 &lt;strong&gt;Key insight&lt;/strong&gt;&lt;br/&gt;&#xA;The browser already knows how to put your query into a URL (that&amp;rsquo;s the &lt;code&gt;%s&lt;/code&gt;). The missing piece is on Gemini&amp;rsquo;s side: something has to read it back from the URL and press &lt;strong&gt;Send&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;why-doesnt-it-work-out-of-the-box&#34;&gt;Why doesn&amp;rsquo;t it work out of the box?&lt;/h2&gt;&#xA;&lt;p&gt;Every Chromium-based browser lets you add a &amp;ldquo;site search&amp;rdquo;: a URL template with &lt;code&gt;%s&lt;/code&gt; in place of the query. When you type the shortcut and press &lt;kbd&gt;Tab&lt;/kbd&gt;, whatever you type next goes into &lt;code&gt;%s&lt;/code&gt;. That&amp;rsquo;s how &lt;code&gt;https://www.google.com/search?q=%s&lt;/code&gt; works, and that&amp;rsquo;s how &lt;code&gt;https://chatgpt.com/?q=%s&lt;/code&gt; or &lt;code&gt;https://www.perplexity.ai/search?q=%s&lt;/code&gt; work, because these sites read the query from the URL.&lt;/p&gt;&#xA;&lt;p&gt;Gemini doesn&amp;rsquo;t. It&amp;rsquo;s a single-page app. When it loads, its router takes over the URL and nothing reads the query string, so the prompt is dropped and you get an empty chat. There&amp;rsquo;s no &lt;code&gt;?q=&lt;/code&gt;, no &lt;code&gt;?prompt=&lt;/code&gt;, nothing documented.&lt;/p&gt;&#xA;&lt;p&gt;What about Chrome&amp;rsquo;s built-in &lt;code&gt;@gemini&lt;/code&gt; shortcut? It exists, but it lives only in desktop Google Chrome, you can&amp;rsquo;t rename it or edit it, and it&amp;rsquo;s not there in Edge, Brave, Vivaldi or plain Chromium. I wanted the same &lt;code&gt;gg&lt;/code&gt; shortcut everywhere.&lt;/p&gt;&#xA;&lt;h2 id=&#34;step-1-install-a-userscript-manager&#34;&gt;Step 1: install a userscript manager&lt;/h2&gt;&#xA;&lt;p&gt;A userscript manager is a browser extension that runs small JavaScript snippets on the websites you choose. I use &lt;strong&gt;Violentmonkey&lt;/strong&gt;: it&amp;rsquo;s open source and the script below doesn&amp;rsquo;t need any special permissions (&lt;code&gt;@grant none&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Edge&lt;/strong&gt;: install Violentmonkey from Edge Add-ons (the &lt;a href=&#34;https://violentmonkey.github.io/get-it/&#34;&gt;official site&lt;/a&gt; links to every store).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Chrome&lt;/strong&gt;: Chrome has dropped Manifest V2 extensions, so pick the Manifest V3 build of Violentmonkey (currently in beta) or use &lt;strong&gt;Tampermonkey&lt;/strong&gt;. The script works the same in both.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Firefox&lt;/strong&gt;: Violentmonkey works too, see the &lt;a href=&#34;#faq&#34;&gt;FAQ&lt;/a&gt; at the end.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;div class=&#34;yellow-blockquote&#34;&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;⚠️ &lt;strong&gt;Chrome 138+&lt;/strong&gt;&lt;br/&gt;&#xA;Userscript managers now need an extra switch. Go to &lt;code&gt;chrome://extensions&lt;/code&gt;, click &lt;strong&gt;Details&lt;/strong&gt; under your userscript manager and turn on &lt;strong&gt;Allow User Scripts&lt;/strong&gt;. Without it the extension is installed but no script runs.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;step-2-add-the-userscript&#34;&gt;Step 2: add the userscript&lt;/h2&gt;&#xA;&lt;p&gt;Open the Violentmonkey dashboard, click &lt;strong&gt;+&lt;/strong&gt; → &lt;strong&gt;New&lt;/strong&gt;, replace the template with the code below and hit &lt;strong&gt;Save&lt;/strong&gt;. The same script is in my &lt;a href=&#34;https://gist.github.com/marrrcin/6b405e660f0ad838a42c916522f09dbb&#34;&gt;public gist&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;figure class=&#34;codeblock on-ink&#34;&gt;&#xA;  &lt;figcaption class=&#34;codeblock__caption&#34;&gt;&#xA;    &lt;span class=&#34;codeblock__lang&#34;&gt;javascript&lt;/span&gt;&#xA;    &lt;span class=&#34;codeblock__caption-right&#34;&gt;&#xA;      &lt;button type=&#34;button&#34; class=&#34;codeblock__copy&#34; aria-label=&#34;Copy code to clipboard&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;/span&gt;&#xA;  &lt;/figcaption&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// ==UserScript==&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// @name         Gemini URL Prompt &amp;amp; Auto-Submit&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// @namespace    local.gemini.prompt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// @version      1.0&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// @description  Reads ?prompt= or ?q= from URL, fills Gemini textbox, and submits&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// @match        https://gemini.google.com/*&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// @run-at       document-start&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// @grant        none&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// ==/UserScript==&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s1&#34;&gt;&amp;#39;use strict&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// 1. Capture the parameter immediately before Gemini&amp;#39;s router strips it&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;url&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;URL&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;location&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;promptText&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;searchParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;prompt&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;searchParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;q&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;promptText&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// Clean the URL in the address bar so refreshing the page won&amp;#39;t re-send the prompt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;searchParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;delete&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;prompt&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;searchParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;delete&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;q&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;history&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;replaceState&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({},&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;title&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;pathname&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;search&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// 2. Poll for the editor to load (gives up after 15 seconds)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;attempts&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;interval&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;setInterval&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;attempts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;editor&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;querySelector&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;.ql-editor[contenteditable=&amp;#34;true&amp;#34;], div[contenteditable=&amp;#34;true&amp;#34;][role=&amp;#34;textbox&amp;#34;]&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;editor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;clearInterval&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;interval&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;editor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;focus&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;c1&#34;&gt;// Insert text using execCommand so Angular&amp;#39;s state detects the input&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;execCommand&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;insertText&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;promptText&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;editor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;dispatchEvent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Event&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;input&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;bubbles&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;true&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}));&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;c1&#34;&gt;// 3. Wait briefly for the Send button to activate, then submit&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;setTimeout&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;sendBtn&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;querySelector&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;s1&#34;&gt;&amp;#39;button.send-button, button[aria-label*=&amp;#34;Send&amp;#34;], button[aria-label*=&amp;#34;Wyślij&amp;#34;]&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;sendBtn&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;sendBtn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;disabled&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;nx&#34;&gt;sendBtn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;click&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;c1&#34;&gt;// Fallback: simulate pressing Enter&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;nx&#34;&gt;editor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;dispatchEvent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;KeyboardEvent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;keydown&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                        &lt;span class=&#34;nx&#34;&gt;key&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Enter&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;code&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Enter&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;keyCode&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;which&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;bubbles&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;true&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;p&#34;&gt;}));&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;300&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;attempts&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;150&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;clearInterval&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;interval&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;100&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;})();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/figure&gt;&#xA;&lt;h3 id=&#34;how-the-script-works&#34;&gt;How the script works&lt;/h3&gt;&#xA;&lt;p&gt;It&amp;rsquo;s ~50 lines, but a few lines in there are not obvious:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;code&gt;@run-at document-start&lt;/code&gt;&lt;/strong&gt; - the script runs before Gemini&amp;rsquo;s own JavaScript. This is the important one: if it ran later, the router would already have rewritten the URL and the prompt would be gone.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;It reads &lt;code&gt;?prompt=&lt;/code&gt; or &lt;code&gt;?q=&lt;/code&gt;&lt;/strong&gt; - the browser URL-encodes your query when it fills in &lt;code&gt;%s&lt;/code&gt;, and &lt;code&gt;searchParams.get()&lt;/code&gt; decodes it back, so spaces, &lt;code&gt;&amp;amp;&lt;/code&gt;, &lt;code&gt;?&lt;/code&gt; and non-English characters all survive.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;code&gt;history.replaceState&lt;/code&gt;&lt;/strong&gt; removes the parameter from the address bar, so refreshing the page or restoring the tab later doesn&amp;rsquo;t send the same prompt again.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;It polls for the chat box&lt;/strong&gt; every 100 ms, for up to 15 seconds. Gemini renders the editor some time after the page loads, so there&amp;rsquo;s nothing to grab at &lt;code&gt;document-start&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;code&gt;document.execCommand(&#39;insertText&#39;)&lt;/code&gt;&lt;/strong&gt; instead of setting &lt;code&gt;innerText&lt;/code&gt;. The chat box is a &lt;code&gt;contenteditable&lt;/code&gt; element managed by Angular, and Angular only notices text that arrives the way typed text does. Set &lt;code&gt;innerText&lt;/code&gt; directly and the text shows up, but the &lt;strong&gt;Send&lt;/strong&gt; button stays disabled. Yes, &lt;code&gt;execCommand&lt;/code&gt; is deprecated. It&amp;rsquo;s also the most reliable way to fake typing into a rich-text editor.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;It clicks Send&lt;/strong&gt;, found by its CSS class or its &lt;code&gt;aria-label&lt;/code&gt;. If it can&amp;rsquo;t find an enabled button, it falls back to pressing &lt;kbd&gt;Enter&lt;/kbd&gt; in the editor.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;step-3-add-gemini-as-a-site-search-in-your-browser&#34;&gt;Step 3: add Gemini as a site search in your browser&lt;/h2&gt;&#xA;&lt;h3 id=&#34;google-chrome--chromium--brave&#34;&gt;Google Chrome / Chromium / Brave&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Go to &lt;code&gt;chrome://settings/searchEngines&lt;/code&gt; (Settings → Search engine → Manage search engines and site search).&lt;/li&gt;&#xA;&lt;li&gt;Next to &lt;strong&gt;Site search&lt;/strong&gt;, click &lt;strong&gt;Add&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Fill in:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Name&lt;/strong&gt;: &lt;code&gt;Gemini&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Shortcut&lt;/strong&gt;: &lt;code&gt;gg&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;URL with %s in place of query&lt;/strong&gt;: &lt;code&gt;https://gemini.google.com/app?prompt=%s&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Click &lt;strong&gt;Add&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;microsoft-edge&#34;&gt;Microsoft Edge&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Go to &lt;code&gt;edge://settings/searchEngines&lt;/code&gt; (Settings → Privacy, search, and services → Address bar and search → Manage search engines).&lt;/li&gt;&#xA;&lt;li&gt;Click &lt;strong&gt;Add&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Fill in:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Search engine&lt;/strong&gt;: &lt;code&gt;Gemini&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Shortcut&lt;/strong&gt;: &lt;code&gt;gg&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;URL with %s in place of query&lt;/strong&gt;: &lt;code&gt;https://gemini.google.com/app?prompt=%s&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Click &lt;strong&gt;Add&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;You can pick any shortcut you like. I went with &lt;code&gt;gg&lt;/code&gt; because it&amp;rsquo;s quick to type and doesn&amp;rsquo;t collide with any real word I&amp;rsquo;d type at the start of the address bar.&lt;/p&gt;&#xA;&lt;div class=&#34;yellow-blockquote&#34;&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;🤔 &lt;strong&gt;Can I make Gemini my default search engine?&lt;/strong&gt;&lt;br/&gt;&#xA;Yes: click &lt;strong&gt;⋮&lt;/strong&gt; next to the entry and choose &lt;strong&gt;Make default&lt;/strong&gt;. Every query typed in the address bar then goes to Gemini. I don&amp;rsquo;t, because I still want plain Google for &amp;ldquo;weather tomorrow&amp;rdquo;, but it works.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;use-it&#34;&gt;Use it&lt;/h2&gt;&#xA;&lt;p&gt;Type &lt;code&gt;gg&lt;/code&gt; in the address bar, press &lt;kbd&gt;Tab&lt;/kbd&gt; (Chrome also accepts &lt;kbd&gt;Space&lt;/kbd&gt;), and the address bar switches to &lt;em&gt;Search Gemini&lt;/em&gt;. Write your prompt, hit &lt;kbd&gt;Enter&lt;/kbd&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Gemini opens, the prompt appears in the chat box, and about a second later it&amp;rsquo;s sent and the answer starts streaming. The address bar shows a clean &lt;code&gt;https://gemini.google.com/app&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;troubleshooting&#34;&gt;Troubleshooting&lt;/h2&gt;&#xA;&lt;h3 id=&#34;gemini-opens-but-the-chat-box-stays-empty&#34;&gt;Gemini opens, but the chat box stays empty&lt;/h3&gt;&#xA;&lt;p&gt;The script didn&amp;rsquo;t run. Check that:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the script is &lt;strong&gt;enabled&lt;/strong&gt; in the Violentmonkey dashboard,&lt;/li&gt;&#xA;&lt;li&gt;on Chrome 138+, &lt;strong&gt;Allow User Scripts&lt;/strong&gt; is turned on for the extension (see step 1),&lt;/li&gt;&#xA;&lt;li&gt;the URL in your site search starts with exactly &lt;code&gt;https://gemini.google.com/&lt;/code&gt; so &lt;code&gt;@match&lt;/code&gt; covers it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Open Gemini and click the Violentmonkey icon: the script should be listed as active on that page.&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-prompt-is-typed-in-but-not-sent&#34;&gt;The prompt is typed in, but not sent&lt;/h3&gt;&#xA;&lt;p&gt;The script can&amp;rsquo;t find the &lt;strong&gt;Send&lt;/strong&gt; button. It matches the English label &lt;code&gt;Send&lt;/code&gt; and the Polish &lt;code&gt;Wyślij&lt;/code&gt;, because I use Gemini in Polish 🇵🇱. If your Gemini is in another language, add your translation to the selector, e.g. for German:&lt;/p&gt;&#xA;&lt;figure class=&#34;codeblock on-ink&#34;&gt;&#xA;  &lt;figcaption class=&#34;codeblock__caption&#34;&gt;&#xA;    &lt;span class=&#34;codeblock__lang&#34;&gt;javascript&lt;/span&gt;&#xA;    &lt;span class=&#34;codeblock__caption-right&#34;&gt;&#xA;      &lt;button type=&#34;button&#34; class=&#34;codeblock__copy&#34; aria-label=&#34;Copy code to clipboard&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;/span&gt;&#xA;  &lt;/figcaption&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;button.send-button, button[aria-label*=&amp;#34;Send&amp;#34;], button[aria-label*=&amp;#34;Senden&amp;#34;]&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;To find the label, right-click the Send button → &lt;strong&gt;Inspect&lt;/strong&gt; and look for &lt;code&gt;aria-label&lt;/code&gt;. The same goes for the editor selector: if Google redesigns the page, this is the line to update.&lt;/p&gt;&#xA;&lt;h3 id=&#34;i-have-more-than-one-google-account&#34;&gt;I have more than one Google account&lt;/h3&gt;&#xA;&lt;p&gt;Gemini puts the account index in the path. To open the prompt in your second account, use:&lt;/p&gt;&#xA;&lt;figure class=&#34;codeblock on-ink&#34;&gt;&#xA;  &lt;figcaption class=&#34;codeblock__caption&#34;&gt;&#xA;    &lt;span class=&#34;codeblock__lang&#34;&gt;text&lt;/span&gt;&#xA;    &lt;span class=&#34;codeblock__caption-right&#34;&gt;&#xA;      &lt;button type=&#34;button&#34; class=&#34;codeblock__copy&#34; aria-label=&#34;Copy code to clipboard&#34;&gt;Copy&lt;/button&gt;&#xA;    &lt;/span&gt;&#xA;  &lt;/figcaption&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;https://gemini.google.com/u/1/app?prompt=%s&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;You can also add two site searches, e.g. &lt;code&gt;gg&lt;/code&gt; for personal and &lt;code&gt;gw&lt;/code&gt; for work.&lt;/p&gt;&#xA;&lt;h3 id=&#34;refreshing-the-page-sends-the-prompt-again&#34;&gt;Refreshing the page sends the prompt again&lt;/h3&gt;&#xA;&lt;p&gt;It shouldn&amp;rsquo;t. That&amp;rsquo;s what &lt;code&gt;replaceState&lt;/code&gt; is for. If it does, something re-added the parameter to the URL. Check that you don&amp;rsquo;t have two copies of the script enabled.&lt;/p&gt;&#xA;&lt;h2 id=&#34;a-word-of-caution&#34;&gt;A word of caution&lt;/h2&gt;&#xA;&lt;p&gt;The script sends &lt;strong&gt;any&lt;/strong&gt; &lt;code&gt;?prompt=&lt;/code&gt; it finds, no matter where the link came from. Someone could send you a link like &lt;code&gt;https://gemini.google.com/app?prompt=...&lt;/code&gt; and opening it would send that prompt from your account. It&amp;rsquo;s low risk, since they can&amp;rsquo;t read the answer, but if it bothers you, rename the parameter in both the script and the site search to something only you use, e.g. &lt;code&gt;?gg_prompt_7f3a=%s&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;faq&#34;&gt;FAQ&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Does Gemini have an official URL parameter for prompts?&lt;/strong&gt;&lt;br/&gt;&#xA;No. That&amp;rsquo;s why this setup needs the userscript. ChatGPT (&lt;code&gt;https://chatgpt.com/?q=%s&lt;/code&gt;) and Perplexity (&lt;code&gt;https://www.perplexity.ai/search?q=%s&lt;/code&gt;) support it natively, so for those a plain site search is enough.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Does it work in Firefox?&lt;/strong&gt;&lt;br/&gt;&#xA;The userscript does: Violentmonkey is available for Firefox. For the shortcut, the simplest way is a bookmark: set its URL to &lt;code&gt;https://gemini.google.com/app?prompt=%s&lt;/code&gt; and its &lt;strong&gt;Keyword&lt;/strong&gt; to &lt;code&gt;gg&lt;/code&gt;. Then &lt;code&gt;gg your prompt&lt;/code&gt; in the address bar does the same thing.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Does it work on mobile?&lt;/strong&gt;&lt;br/&gt;&#xA;Not in the regular Chrome app on Android or iOS, because it doesn&amp;rsquo;t support extensions. This is a desktop trick.&lt;/p&gt;&#xA;&lt;h2 id=&#34;thats-all&#34;&gt;That&amp;rsquo;s all&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;gg&lt;/code&gt; [TAB] and off you go. Happy prompting! 🚀&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
