Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛡️ RageShield + FeedGuard // Privacy-First Content Intervention Engine

TypeScript Manifest V3 Privacy Storage License

A privacy-first Chrome browser extension that helps users detect persuasion patterns, analyze emotional intensity, and filter out outrage-driven bait in real-time across YouTube feeds, search results, and Shorts.

Note

Development Note: This repository was published after the initial development phase. The GitHub commit history therefore does not represent the complete development timeline.


🔍 Real-Time Content Analysis Preview

┌────────────────────────────────────────────────────────────────────────┐
│  YouTube Feed Item Detected: "THEY LIED TO EVERYONE ABOUT THIS!!"       │
│                                                                        │
│  [ANALYSIS]                                                            │
│  ├── Emotional Intensity: 84/100 (HIGH OUTRAGE)                        │
│  ├── Detected Patterns: Fear Appeal, Us-vs-Them, Urgency Exaggeration  │
│  └── Category: Tech Controversy / Outrage Hype                         │
│                                                                        │
│  [INTERVENTION APPLIED]                                                │
│  ├── Injected Badge: ⚠️ [Intensity: 84]                                 │
│  ├── Neutral Headline Rewrite: "Overview of the recent policy changes" │
│  └── Soft-Lock Shield: Video auto-muted pending deliberate user click  │
└────────────────────────────────────────────────────────────────────────┘

🏗️ Extension Architecture

graph TD
    subgraph Browser ["YouTube Live DOM Environment"]
        DOM[Feed / Watch Pages / Shorts] --> Observer[MutationObserver Engine]
        Observer --> Extract[Text & Metadata Extractor<br/>Titles, Descriptions, Authors]
    end

    subgraph LocalEngine ["RageShield Local Engine (100% On-Device)"]
        Extract --> RuleEngine[Persuasion & Linguistic Pattern Scorer]
        RuleEngine --> ToneCalc[Emotional Tone & Intensity Calculator<br/>Score: 0 to 100]
        ToneCalc --> FeedGuard[FeedGuard Filter<br/>55+ Categories & Focus Presets]
    end

    subgraph Interventions ["Dynamic UI Interventions"]
        FeedGuard --> Badges[Intensity Score Badges]
        FeedGuard --> Rewriter[Neutral Headline Rewriter Engine]
        FeedGuard --> Shield[Blur Shield & Auto-Mute Video Layer]
        FeedGuard --> Popup[Detailed Persuasion Explainer Panel]
    end

    LocalEngine --> Storage[(Chrome Storage & IndexedDB)]

    classDef browser fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#fff;
    classDef engine fill:#0f172a,stroke:#10b981,stroke-width:2px,color:#fff;
    class DOM,Observer,Extract browser;
    class RuleEngine,ToneCalc,FeedGuard engine;
Loading

⚡ Quick Start

1. Clone & Install Dependencies

git clone https://github.com/Krishagarwal558/RageShield.git
cd RageShield
npm install

2. Build the Extension

npm run build

3. Load into Google Chrome

  1. Navigate to chrome://extensions in your browser.
  2. Toggle Developer mode in the top-right corner.
  3. Click Load unpacked and select the generated dist/ (or build) folder.
  4. Open YouTube to see the live badges and analysis panels!

What It Does

  • Scores visible YouTube content with a local emotional intensity score from 0 to 100.
  • Detects persuasion patterns such as fear appeals, certainty language, engagement bait, mockery, personal attacks, exaggeration, urgency, and us-vs-them framing.
  • Estimates emotional tone, including anger, fear, contempt, excitement, informational, and neutral signals.
  • Adds lightweight YouTube badges that show the intensity score.
  • Opens a detailed analysis panel with exact trigger phrases and explanations.
  • Rewrites emotionally loaded headlines into more neutral versions.
  • Lets users block or allow categories through FeedGuard.
  • Supports blur mode and soft-lock style attention controls.
  • Pauses and mutes blocked video/audio while content is hidden.
  • Includes a searchable category list with 55 content categories.
  • Stores analytics locally with IndexedDB.
  • Stores settings locally with Chrome Storage.
  • Includes a reply checker for aggressive or insulting drafts.

What It Does Not Do

  • It does not fact check.
  • It does not label content as misinformation.
  • It does not send browsing data to a server.
  • It does not require an API key.
  • It does not call OpenAI, Gemini, Anthropic, Ollama, or any external AI provider in the MVP.
  • It does not modify YouTube permanently. It only changes the live page in your browser tab.

Screens and Controls

The extension includes:

  • Popup control panel
  • Full options dashboard
  • Category search
  • Local analytics view
  • FeedGuard controls
  • Focus mode presets
  • Time-based rules
  • Privacy controls
  • Persuasion technique library

FeedGuard Categories

FeedGuard includes categories such as:

  • Celebrity Drama
  • Political Outrage
  • Gaming Drama
  • Crypto Hype
  • Gambling Content
  • Productivity Guru Content
  • Relationship Gossip
  • Gore & Graphic Injury
  • Conspiracy Content
  • Culture War
  • Financial Hype
  • AI Hype
  • Health Anxiety
  • Medical Advice
  • Fitness & Body Image
  • Diet & Weight Loss
  • Shopping & Deals
  • Luxury Flex
  • Drama Commentary
  • True Crime
  • Crime & Public Safety
  • Disaster & Crisis
  • War & Conflict
  • Sports Drama
  • Pranks & Stunts
  • Religion & Spirituality
  • Dating Advice
  • Science
  • History
  • Programming
  • Education
  • Music
  • Movies & TV
  • Comedy
  • Memes
  • Career & Jobs

More categories can be added through the local category registry.

How Scoring Works

The MVP uses a local rule engine.

For each visible YouTube item, the extension extracts text from:

  • title
  • description or body text
  • author/channel text
  • visible Shorts metadata where available

Then it checks the text against local pattern sets:

  • persuasion technique patterns
  • emotional tone patterns
  • category patterns
  • custom user triggers

The emotional intensity score is calculated from technique pressure and tone pressure, then adjusted by the user's sensitivity level:

  • Relaxed
  • Balanced
  • Strict

Scores are displayed as:

  • 0-20: Informational
  • 21-40: Lightly Emotional
  • 41-60: Emotionally Charged
  • 61-80: Highly Persuasive
  • 81-100: Extreme Emotional Manipulation

Some categories, such as Gore & Graphic Injury, can force a red badge indicator even if the emotional intensity number is low.

How FeedGuard Works

FeedGuard receives the analysis result and checks it against the user's settings.

It can act when:

  • a detected category is blocked
  • whitelist mode is enabled
  • a focus session is active
  • a schedule rule is active
  • an emotional tone filter crosses the user's threshold

When content is hidden, the extension overlays the item, blurs it, and pauses/mutes associated media. The original YouTube content is not deleted.

Privacy

RageShield + FeedGuard is local-first.

Local storage locations:

  • Chrome Storage: user settings
  • IndexedDB: local analytics events

No telemetry is sent by default. No browsing history is uploaded. External AI providers are represented in the architecture for future support, but they are not called by the current MVP.

About

TypeScript browser extension to analyze, filter, and control emotionally charged or toxic content across the web.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages