╔══════════════════════════════════════════════════════════════════╗
║  BatchGemini — Bulk Image Generation for Google Gemini            ║
║  v1.2.0  ·  Chrome extension (Manifest V3)                        ║
╚══════════════════════════════════════════════════════════════════╝

INSTALL (takes about 30 seconds)
────────────────────────────────────────────────────────────────────
1. Unzip this file somewhere permanent, e.g.  C:\Tools\BatchGemini
      ⚠ Do NOT run it from inside the .zip, and do not delete or move
        the folder afterwards — Chrome loads it from that exact path.

2. Open Chrome and go to:      chrome://extensions

3. Turn ON "Developer mode"  (toggle, top-right corner).

4. Click "Load unpacked"  (top-left) and select the folder you
   unzipped — the one that directly contains  manifest.json

5. Pin BatchGemini to the toolbar (puzzle-piece icon → pin).


HOW TO USE
────────────────────────────────────────────────────────────────────
1. Open  https://gemini.google.com  and make sure you are logged in.
2. Click the BatchGemini icon → the side panel opens.
3. Check the dot in the panel header:
       green  = connected and ready
       red    = not connected → reload the gemini.google.com tab
   (You can also press Settings ⚙ → Connection → Test.)
4. Paste your prompts — ONE PROMPT PER LINE.
   Or use the  ↥ .txt  /  ↥ CSV  buttons (examples in  samples\).
5. Pick an aspect ratio, optionally add reference images.
6. Press  ⚡ Generate Batch   (or Ctrl+Enter).

Finished images download automatically to:
      Downloads\Gemini-Auto\


TROUBLESHOOTING
────────────────────────────────────────────────────────────────────
• Nothing happens / "tab not connected"
      → Reload the gemini.google.com tab, then press Generate again.
        Chrome keeps the old script alive in tabs opened before the
        extension was installed.

• "Response finished without an image"
      → Settings ⚙ → make sure "Force image mode" is ON.
        Still text-only? Also turn ON "Use Gemini's image tool".

• "Couldn't type the prompt"  /  "Couldn't submit the prompt"
      → Google changed Gemini's page layout.
        Press Settings ⚙ → Connection → DIAGNOSE. It names the exact
        selector that stopped matching. All selectors live in one
        place: the CONFIG object at the top of  content.js

• "RATE_LIMIT: ..."
      → Gemini's image quota, or a temporary hiccup. BatchGemini
        already waits 60s, then 120s, then pauses with your prompts
        still queued. Raise Settings ⚙ → "Delay between prompts".

• Everything fails instantly
      → Open the gemini.google.com tab, press F12, and look in the
        Console for lines starting with  [BatchGemini]  — they say
        exactly what broke.


• "This key is for BatchGPT, not BatchGemini"
      → You pasted your BatchGPT key. BatchGemini needs its OWN key,
        and it starts with  GEM-  (BatchGPT keys start with LIC-).
        Both can run on the same PC at the same time.


GOOD TO KNOW
────────────────────────────────────────────────────────────────────
• Runs entirely in your browser. No API key, no server, no account.
  The "Sign in" button only saves an email locally on that PC — it is
  not a real login and nothing is uploaded anywhere.

• Images are downloaded at FULL resolution, not the thumbnail size
  Gemini displays in the chat.

• Long conversations make Gemini slow and error-prone, so a fresh
  chat is started every 8 images by default
  (Settings ⚙ → "New chat every"). Set 0 to turn that off.

• Prompts are sent as a SINGLE line. In Gemini a bare Enter submits,
  so multi-line prompts would send themselves halfway through.

• Settings, prompts and reference images are stored per-PC, so a
  second computer starts fresh.

• Not affiliated with Google. Automating the Gemini web UI may
  conflict with Google's Terms of Service — use on your own account,
  at your own risk. See README.md for the full explanation.
