Skip to content

albertpod/bs-filter

Repository files navigation

Feed Filter

A Chrome extension that detects and filters noise, corporate jargon, and humblebragging from your social media feeds. Built with Plasmo.

Currently supports LinkedIn and X (Twitter).

Written with AI coding assistance under the guidance of @albertpod. Hopefully no security issues here... but if you find one, that was definitely the AI's idea.

Features

  • Automatic Detection — Uses LLM analysis to classify posts in real time as interesting, maybe, or noise.
  • Smart Blurring — Noisy posts are blurred instantly; interesting content stays visible. "Maybe" posts get a light blur with a ? indicator.
  • Pre-Filter Heuristics — A fast client-side keyword scorer resolves obvious posts without calling the LLM at all.
  • Hover to Peek — Blurred posts can be previewed on hover or revealed with one click.
  • Multi-Platform — Composable adapter architecture. Adding a new platform is ~25 lines of config.
  • Multiple Providers — Ollama (local, default), Groq, OpenRouter, OpenAI. Bring your own model ID.
  • Customizable — Define your own interest categories, keywords, system prompt, extra instructions, and classification thresholds.
  • Gamification — Stats dashboard with streaks, badges, and category breakdowns.

Getting Started

Prerequisites

  • Node.js v18+
  • pnpm

Install

git clone https://github.com/albertpod/bs-filter.git
cd bs-filter
pnpm install

Configure

cp .env.example .env

For Ollama (default, no key needed): just have Ollama running locally with a model pulled (e.g. ollama pull gemma3:4b).

For cloud providers: add your API key to PLASMO_PUBLIC_LLM_API_KEY in .env.

Development

pnpm dev

Load in Chrome

  1. Go to chrome://extensions
  2. Enable Developer mode
  3. Click Load unpacked
  4. Select build/chrome-mv3-dev

How It Works

  1. Content script — A per-platform adapter defines CSS selectors for posts. A shared engine injects blur CSS, sets up a MutationObserver, and runs look-ahead scanning.
  2. Pre-filter — A fast client-side heuristic scores posts 0–1 by keyword signals. High-confidence posts are resolved instantly without the LLM.
  3. LLM analysis — Ambiguous posts go to the background script, which calls the configured LLM provider for a verdict, score, category, and reason.
  4. Verdict — Posts are unblurred (interesting), lightly blurred with a ? (maybe), or fully blurred (noise).

When the filter is disabled, no blurring is applied at all — posts render normally.

Configuration

All settings are accessible from the extension popup:

Setting Description
Provider Ollama (local), Groq, OpenRouter, or OpenAI
Model Pick from the list or type any custom model ID
Custom prompt Override the built-in system prompt entirely
Extra instructions Append instructions to the default prompt
Interest categories Toggle built-in categories or create custom ones with keywords
Auto-show threshold Pre-filter score above which posts skip the LLM and auto-unblur (default 0.7)
Skip AI threshold Pre-filter score below which posts skip the LLM and stay blurred (default 0.3)

Adding a New Platform

Create a content script in contents/ with a PlatformAdapter:

import type { PlasmoCSConfig } from "plasmo"
import { initPlatformFilter } from "~lib/platform/engine"
import type { PlatformAdapter } from "~lib/platform/types"

export const config: PlasmoCSConfig = {
  matches: ["https://www.reddit.com/*"],
  all_frames: false
}

const reddit: PlatformAdapter = {
  name: "reddit",
  postSelector: "shreddit-post",
  textSelector: "[slot='text-body']",
}

if (typeof window !== "undefined") {
  initPlatformFilter(reddit)
}

const PlaceholderComponent = () => null
export default PlaceholderComponent

Add the host permission in package.json and you're done.

Tech Stack

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages