8000 GitHub - PiPyL/jev-zenfeed Β· GitHub
[go: up one dir, main page]

Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

30 Commits

Folders and files

Repository files navigation

πŸ›‘οΈ ZenFeed

ZenFeed Logo

Active Noise Cancellation for your eyes.
The first AI-powered active noise cancellation for your social feed.

GitHub Release License: MIT Manifest V3 GitHub Stars PRs Welcome

Quick Install β€’ Features β€’ Configuration β€’ Architecture β€’ Testing β€’ Contributing β€’ Privacy Policy β€’ πŸ‡»πŸ‡³ BαΊ£n TiαΊΏng Việt


ZenFeed is an open-source Chrome Extension that brings Active Noise Cancellation to your eyes. Just like noise-canceling headphones filter out background chatter, ZenFeed automatically identifies and collapses visual noise (gambling ads, toxic drama, movie spoilers, predatory loans, pyramid schemes) on your Facebook News Feed and your Threads home feeds in real time using natural language criteria you define.

Powered by the Jev (TypeSafe AI) System One architecture, ZenFeed delivers sub-200ms evaluation latency, ultra-low cost ($0.042 / 1M tokens), zero layout shift (Zero-CLS), and 100% BYOK privacy with no intermediate proxy servers.


✨ Features

  • 🎧 Active Noise Cancellation for Eyes: Automatically collapses or softly blurs posts matching your personal criteria before they interrupt your attention.
  • ⚑ Sub-200ms Decision Speed: Ultra-fast Bernoulli Boolean classification via Jev System One with calibrated confidence scoring.
  • πŸ”’ 100% BYOK (Bring Your Own Key) & Privacy First: Direct client-to-AI communication over TLS 1.3. No intermediate tracking servers, no telemetry, no cookies captured, never touches private messages or credentials.
  • 🎯 Atomic Questions & Whitelist Guard: Evaluates violation criteria and whitelist exceptions independently. A whitelist exemption needs its own 70% bar and must be at least as strong as the violation, so lowering or raising the hide threshold cannot silently keep or drop those posts. For example: block unwanted job spam while safely preserving IT & AI developer job opportunities!
  • πŸ‘οΈ Reading-Zone Aware & Zero-CLS:
    • Preserves layout height when blurring posts to prevent disruptive page jumping (CLS = 0).
    • Delay collapse if a post is currently in the active reading viewport (top 65%).
    • Provides a discreet badge instead of collapsing posts you have already interacted with (liked, commented, expanded).
  • πŸ’Ύ Two-Tier Smart Caching (IndexedDB LRU): Evaluates identical content (repeated ads, multi-tab browsing, re-scrolling) exactly once. Re-scrolling old posts costs 0 tokens.
  • πŸ› οΈ 1-Click Filter Presets: Built-in presets for Anti-Gambling, Anti-Spoiler, Anti-Celebrity Drama, and Anti-Crypto Scams.

πŸš€ Quick Install Guide

Method 1: Install from Chrome Web Store (Recommended 1-Click)

πŸ‘‰ Add ZenFeed to Chrome (Official Chrome Web Store)

Click Add to Chrome on the official store page for instant 1-click install and automatic background updates.


Method 2: Install from Release ZIP (Direct Release)

  1. Download the latest release ZIP: πŸ‘‰ Download zenfeed-v1.2.1.zip (Direct 1-Click) or browse all versions at ZenFeed Releases.
  2. Extract the ZIP file: Unzip zenfeed-v1.2.1.zip to a folder on your computer (e.g. Downloads/zenfeed-v1.2.1).

    πŸ’‘ Important: Make sure to extract the archive fully (on Windows: right-click zenfeed-v1.2.1.zip β†’ Extract All...). When loading the extension, choose the directory that directly contains manifest.json.

  3. Open Chrome Extensions Manager: In Chrome, Edge, Brave, or Cα»‘c Cα»‘c, navigate to:
    chrome://extensions
    
  4. Enable Developer Mode: Turn on the Developer mode toggle in the top-right corner.
  5. Load Unpacked Extension: Click the Load unpacked button in the top-left corner and select the extracted folder (the folder containing manifest.json).
  6. Pin to Toolbar: Click the puzzle piece icon on your browser toolbar and pin ZenFeed for easy access.

Method 3: Install from Source (For Developers)

# Clone the repository
git clone https://github.com/PiPyL/jev-zenfeed.git
cd jev-zenfeed

# Run test suite to verify everything is passing
npm test

# Run syntax and lint checks
npm run lint

Then follow steps 3–6 above, selecting the cloned jev-zenfeed directory.


βš™οΈ Configuration

  1. Click the ZenFeed icon in your browser toolbar to open the settings popup.
  2. Leave OpenRouter selected (recommended). Create a key at openrouter.ai/settings/keys, paste the sk-or-… key, and allow access to openrouter.ai when Chrome asks. If you already have a TypeSafe key, choose TypeSafe instead. (Optional: click "Customize Endpoint" for a proxy or a local mock server).
  3. Click ⚑ Test Connection to verify your API key works.
  4. Select a pre-configured Preset or type your custom filter criteria in plain natural language:
    • Example Criteria: "online gambling, casino ads, loan sharks, gossip drama, cryptocurrency scams"
    • Optional Whitelist: "tech news, AI, software engineering, scientific discoveries"
  5. Set your confidence threshold (default: 70%).
  6. Click Apply (or press Ctrl / Cmd + Enter). The settings immediately apply to all open Facebook and Threads tabs!

Per-platform policies: the Common Β· Facebook Β· Threads bar under the header switch picks what the form edits. Both platforms start on Common; click Customize this platform to give just Facebook or Threads its own copy of the policy (switch, criteria, threshold, display mode…), or Use Common again to discard it. Your API key and interface language stay shared.


πŸ“‚ Architecture

jev-zenfeed/
β”œβ”€β”€ manifest.json              # Chrome Manifest V3 declaration
β”œβ”€β”€ package.json               # Project scripts & repository metadata
β”œβ”€β”€ LICENSE                    # MIT Open Source License
β”œβ”€β”€ CONTRIBUTING.md            # Guidelines for open-source contributors
β”œβ”€β”€ icons/                     # Vector-based brand icons (16, 32, 48, 128px)
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ background/
β”‚   β”‚   β”œβ”€β”€ background.js      # Service Worker: batch queue, badges, lifecycle
β”‚   β”‚   β”œβ”€β”€ decision-cache.js  # Two-tier cache (session + IndexedDB LRU)
β”‚   β”‚   └── jev-client.js      # TypeSafe Jev API client (Atomic prompt construction)
β”‚   β”œβ”€β”€ content/
β”‚   β”‚   β”œβ”€β”€ content.js         # MutationObserver & IntersectionObserver engine (platform-agnostic)
β”‚   β”‚   β”œβ”€β”€ fb-selectors.js    # Resilient Facebook DOM selectors (News Feed post cards)
β”‚   β”‚   β”œβ”€β”€ text-extractor.js  # Facebook post body extraction, sanitization, and FNV-1a hash
β”‚   β”‚   β”œβ”€β”€ th-selectors.js    # Resilient Threads DOM selectors (home feed post cards)
β”‚   β”‚   β”œβ”€β”€ th-text-extractor.js # Threads post body extraction, sanitization, and FNV-1a hash
β”‚   β”‚   β”œβ”€β”€ content.css        # Zero-CLS blur overlay and collapsed banner styles
β”‚   β”‚   β”œβ”€β”€ fb-selectors.js    # Resilient DOM selectors adapting to FB layout changes
β”‚   β”‚   β”œβ”€β”€ text-extractor.js  # Post body extraction, sanitization, and FNV-1a hash
β”‚   β”‚   └── ui-overlay.js      # Banner creation, blur overlay, and "show anyway" button
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ settings-defaults.js # Canonical settings schema & normalization
β”‚   β”‚   β”œβ”€β”€ fast-hash.js       # Fast FNV-1a non-cryptographic content hashing
β”‚   β”‚   β”œβ”€β”€ clip-text.js       # Token-saving head+tail clipping for long posts
β”‚   β”‚   β”œβ”€β”€ logger.js          # Batched non-intrusive logging to storage.session
β”‚   β”‚   β”œβ”€β”€ i18n.js            # Internationalization (English / Vietnamese)
β”‚   β”‚   β”œβ”€β”€ zen-data.js        # Calming quotes & statistics for blurred overlays
β”‚   β”‚   └── flashcards-data.js # Micro-learning cards during gentle blur
β”‚   └── popup/
β”‚       β”œβ”€β”€ popup.html         # Calm Tech settings popup interface
β”‚       β”œβ”€β”€ popup.css          # Styled with Fraunces, Be Vietnam Pro & warm paper palette
β”‚       └── popup.js           # Settings persistence, validation & API connectivity test
β”œβ”€β”€ scripts/
β”‚   └── build-zip.js           # Automated packaging script for GitHub Releases
└── test/
    β”œβ”€β”€ test-jev-mock.js       # Automated Node.js integration tests (30 test suites)
    β”œβ”€β”€ content-harness.html   # DOM content-script test harness on simulated Facebook feed
    β”œβ”€β”€ threads-content-harness.html # DOM content-script test harness on simulated Threads feed
    β”œβ”€β”€ run-harness-headless.js# Headless Chrome runner for content harness
    β”œβ”€β”€ mock-jev-server.js     # Standalone local mock server for Jev API
    └── static-server.js       # Local static HTTP server for test harness

πŸ› οΈ Development & Testing

ZenFeed includes a comprehensive automated test suite verifying manifest validity, atomic question prompt safety, cache consistency, network resilience, and UI behavior.

# Run unit & integration tests (runs against local mock server)
npm test

# Run syntax lint checks across all scripts
npm run lint

# Package release ZIP archive (outputs to dist/zenfeed-v1.2.1.zip)
npm run build:zip

# Start browser-based DOM test harness
npm run harness
# Then open http://localhost:8765/test/content-harness.html

# Or run headless DOM harness via Chrome
npm run harness:headless

🀝 Contributing

Contributions, issues, and feature requests are very welcome! Please check CONTRIBUTING.md for details on how to get started.

  1. Fork the Project: https://github.com/PiPyL/jev-zenfeed
  2. Create your Feature Branch (git checkout -b feat/AmazingFeature)
  3. Run tests to ensure everything passes (npm test && npm run lint)
  4. Commit your Changes (git commit -m 'feat: Add some AmazingFeature')
  5. Push to the Branch (git push origin feat/AmazingFeature)
  6. Open a Pull Request

⭐ Star the Project

If ZenFeed helps protect your mental peace while browsing Facebook or Threads, please consider giving this repository a Star ⭐! It motivates continued development and helps more people find quietude for their eyes.

Star on GitHub


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0