Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

X News Source Verifier

A Manifest V3 Chrome extension for X/Twitter that combines local source-profile checks with an optional backend-assisted news verification layer.

The extension still does not declare a post to be definitively true or false. It shows the source profile you stored for the author, then can request an evidence summary for the hovered post and any visible linked news URLs.

What it does

  • Runs on https://x.com/* and https://twitter.com/*.
  • Tracks the post card currently under your mouse cursor.
  • Checks the hovered post author or current profile page against your local source database.
  • Shows an automatic source badge on X/Twitter profile pages.
  • Lets you add an unknown hovered author to your local source database from the overlay for later review.
  • Adds Alt+Shift+V to verify the hovered post through the local backend.
  • Sends post text, author details, tweet URL, timestamp, and visible external links to POST /api/verify.
  • Shows a bilingual Turkish/English evidence summary with supporting, contradicting, and inconclusive sources.
  • Stores source entries, verification settings, and short-lived verification cache in chrome.storage.local.
  • Lets you search, add, edit, delete, import, export, and reset source entries from the popup.

What it does not do

  • It does not store API keys in the extension.
  • It does not make final truth rulings.
  • It does not track browsing or analytics.
  • It does not verify every X/Twitter post automatically; verification is user-triggered.

Backend setup

  1. Install dependencies:
npm install
  1. Create an environment file:
copy .env.example .env
  1. Fill the API keys you want to use:
GOOGLE_FACT_CHECK_API_KEY=
BRAVE_SEARCH_API_KEY=
LLM_BASE_URL=
LLM_API_KEY=
LLM_MODEL=

Google Fact Check and Brave Search are optional but recommended. The LLM settings are optional; without them, the backend uses rule-based claim extraction and summary text.

  1. Start the backend:
npm start

The default endpoint is http://localhost:8787/api/verify.

Load in Chrome

  1. Open chrome://extensions.
  2. Enable Developer Mode.
  3. Click Load unpacked.
  4. Select this project folder.
  5. Open the extension popup and confirm the backend URL is http://localhost:8787.

If you use a remote backend, add that host to manifest.json host_permissions before loading the extension.

Use the shortcuts

Source profile:

  1. Open X/Twitter.
  2. Move your mouse over a post.
  3. Press Alt+Shift+X.
  4. Read the source profile overlay.
  5. If the author is unknown, click Add source profile to save a review-needed local entry.

News verification:

  1. Start the backend.
  2. Move your mouse over a post.
  3. Press Alt+Shift+V, or click Verify hovered post in the popup.
  4. Read the evidence summary below the source profile.

If Chrome reports a shortcut conflict, open chrome://extensions/shortcuts and assign a new shortcut.

Verification response shape

The backend exposes:

POST /api/verify

Input:

{
  "locale": "tr",
  "postText": "Post text",
  "author": {
    "handle": "@example",
    "displayName": "Example",
    "profileUrl": "https://x.com/example"
  },
  "tweetUrl": "https://x.com/example/status/123",
  "linkedUrls": ["https://example.com/news"],
  "publishedAt": "2026-06-13T10:00:00.000Z"
}

Output:

{
  "status": "INSUFFICIENT",
  "claim": "Extracted checkable claim",
  "summary": "Evidence summary",
  "confidence": 0.34,
  "supportingEvidence": [],
  "contradictingEvidence": [],
  "inconclusiveEvidence": [],
  "checkedAt": "2026-06-13T10:00:00.000Z",
  "limitations": []
}

Possible statuses are SUPPORTED, CONTRADICTED, MIXED, INSUFFICIENT, and ERROR.

Edit trusted sources

Open the extension popup from the toolbar. From there you can:

  • Search by handle, display name, status, category, reason, or notes.
  • Add a source by filling the form and clicking Save source.
  • Edit a source by selecting it, changing fields, and clicking Save source.
  • Delete the selected source.
  • Export the database as JSON.
  • Import a JSON database.
  • Reset to the bundled seed database.

Each source entry uses this shape:

{
  "handle": "@sama",
  "displayName": "Sam Altman",
  "status": "TRUSTED_SOURCE",
  "categories": ["AI company leader", "OpenAI"],
  "reason": "Primary source for OpenAI-related announcements, but still verify claims outside his direct domain.",
  "confidence": 0.9,
  "lastUpdated": "2026-06-12",
  "notes": "Trusted for OpenAI/company announcements, not automatically for all AI claims."
}

Allowed statuses:

  • TRUSTED_SOURCE
  • KNOWN_BUT_MIXED
  • SATIRE_OR_UNRELIABLE
  • UNKNOWN_SOURCE

Privacy

Source data stays local to your Chrome profile. Verification sends only the user-triggered hovered-post package to the configured backend URL. The backend may call Google Fact Check Tools, Brave Search, linked news pages, and the optional LLM endpoint configured in .env.

Tests

Run the backend tests:

npm test

The tests use mocked provider responses and do not require API keys.

Known limitation

X/Twitter changes its DOM frequently. This extension avoids brittle class names and uses article, status links, profile links, tweet text nodes, visible handles, and external anchors, but extraction may still need updates if X changes its markup.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages