Skip to content

Repository files navigation

XPrompt Extension

Prompt once, get your worth. XPrompt is a Chrome (Manifest V3) extension that submits a single prompt to multiple LLM websites simultaneously — ChatGPT, Gemini, Claude, Grok, DeepSeek, and Perplexity — then collects the responses so you can compare them side-by-side on the XPrompt portal.

This repository contains the complete, unmodified source code of the published extension. It is open source so that anyone can verify exactly what the extension does with the pages it can access — what it reads, what it sends, and where.

Official distribution

⚠️ The only official distribution channel is the Chrome Web Store listing with extension ID hcojlcolbpnaeboadpiblocffdnfmcjp.

Any other listing, fork build, or download claiming to be XPrompt is not ours. The XPrompt name and logo are excluded from the open-source license (see LICENSE).

What it does (and doesn't do)

  • Opens a browser window per selected LLM site, fills in your prompt, submits it, and scrapes the response — using plain DOM automation in executor/. No hidden network calls: the extension talks only to the LLM pages you selected and to api.xprompt.app.
  • Your auth token is passed per-message from the portal and is never persisted in extension storage.
  • Sensitive logging (prompt/response content) is gated behind debug flags that are false in every release.
  • Optional local AI (prompt enhancement) uses Chrome's built-in LanguageModel API (Gemini Nano) — on-device, nothing uploaded.

Architecture

extension/
├── manifest.json          MV3 manifest
├── background.js          Service worker — orchestration, window tiling, API calls (ES module)
├── executor/              Injected DOM automation (plain scripts, communicate via globals)
│   ├── dom-helpers.js     Element waits, response extraction
│   ├── input-handlers.js  contenteditable/textarea input
│   ├── submit-handlers.js Submit strategies (enter / click / combined)
│   ├── response-poller.js Response stability polling
│   └── index.js           Entry point wiring the pipeline
├── offscreen.js           Local AI via Chrome built-in LanguageModel API
├── popup.js / popup.html  Toolbar popup (submit-only flow)
└── constants.js           Message types, error codes, response envelopes

Two things worth knowing before reading the code:

  • Mixed module systems. background.js, popup.js, constants.js, config.module.js are ES modules; everything under executor/ (and offscreen.js) is a plain script injected via chrome.scripting.executeScript — they communicate through globals and must not use import/export.
  • Selectors are not in this repo. CSS selectors and URLs for each LLM site are fetched at runtime from GET https://api.xprompt.app/llms (cached 5 minutes). When an LLM site changes its DOM, we update the server config — no extension release needed. If a site stops working for you, open an issue rather than a selector PR.

Development

Load it unpacked:

  1. chrome://extensions → enable Developer mode → Load unpacked → select the extension/ directory.
  2. Note your unpacked build gets a different extension ID than the official one. The production API's CORS policy only allows the official ID, so API-backed flows (submission history, response sync) will be blocked for unpacked builds — this is by design. UI work, executor logic, and local AI can still be exercised; see CONTRIBUTING.md for what is testable.

Checks and packaging:

npm ci
npm run check   # syntax-check all extension JS + validate manifest
npm run pack    # build XPrompt_<version>.zip (Chrome Web Store artifact)

Any change under extension/ must bump manifest.json version (semver: fixes → patch, features → minor).

Release flow

  1. Bump manifest.json version in the PR.
  2. Merge → tag v<version> → manually run the CI workflow on that tag (Actions → CI → Run workflow); it builds XPrompt_<version>.zip as an artifact.
  3. Maintainer uploads the zip to the Chrome Web Store (manual review by Google follows).

Security

Please report vulnerabilities privately — see SECURITY.md.

License

MIT, with the XPrompt name and logo excluded (see the Trademark and Logo Notice in LICENSE).

About

XPrompt Chrome extension - submit one prompt to multiple LLM sites simultaneously (official source)

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages