- JavaScript 68%
- HTML 26.4%
- CSS 5.6%
| icons | ||
| .gitignore | ||
| background.js | ||
| content.js | ||
| manifest.firefox.json | ||
| manifest.json | ||
| popup.html | ||
| popup.js | ||
| README.md | ||
| styles.css | ||
YouTube Educational Filter
A Chrome/Firefox extension that blocks non-educational YouTube videos using a local LLM (LM Studio) to analyze video content.
Features
- 🎓 AI-Powered Classification - Uses local LLM to determine if videos are educational
- 🚫 Blocks Shorts - Automatically blocks YouTube Shorts
- 🔄 Auto-Redirect - Redirects non-educational videos to YouTube homepage
- ⚙️ Customizable Prompt - Modify the AI classification prompt to your needs
- 💾 Smart Caching - Caches results to avoid repeated API calls
- 🌐 Cross-Browser - Works on both Chrome and Firefox
Requirements
- Google Chrome or Mozilla Firefox browser
- LM Studio running locally with a model loaded
Installation
Chrome
-
Clone this repository:
git clone https://github.com/YOUR_USERNAME/YoutubeBlocker.git -
Open Chrome and navigate to
chrome://extensions/ -
Enable "Developer mode" (toggle in top right)
-
Click "Load unpacked" and select the cloned folder
Firefox
-
Clone this repository:
git clone https://github.com/YOUR_USERNAME/YoutubeBlocker.git -
Rename the manifest file:
# In the cloned folder, replace manifest.json with Firefox version mv manifest.json manifest.chrome.json mv manifest.firefox.json manifest.json -
Open Firefox and navigate to
about:debugging#/runtime/this-firefox -
Click "Load Temporary Add-on..."
-
Select the
manifest.jsonfile from the cloned folder
Note: For permanent Firefox installation, the extension needs to be signed by Mozilla or installed in Firefox Developer/Nightly with
xpinstall.signatures.requiredset tofalse.
Setup
-
Download and install LM Studio
-
Load a model in LM Studio (recommended: any instruction-following model)
-
Start the local server in LM Studio (default:
http://localhost:1234) -
Click the extension icon in Chrome to configure:
- API URL: LM Studio endpoint (default:
http://localhost:1234/v1/chat/completions) - Enable Extension: Toggle the filter on/off
- Block All Shorts: Toggle Shorts blocking
- Classification Prompt: Customize how videos are evaluated
- API URL: LM Studio endpoint (default:
-
Click "Test Connection" to verify LM Studio is reachable
How It Works
-
When you visit a YouTube video, the extension extracts:
- Video title
- Channel name
- Video description
-
This metadata is sent to your local LLM with a classification prompt
-
The LLM responds with "EDUCATIONAL" or "NOT_EDUCATIONAL"
-
Non-educational videos are blocked and you're redirected to YouTube homepage
Customizing the Prompt
You can customize the classification prompt in the extension settings. Use these placeholders:
{title}- Video title{channel}- Channel name{description}- Video description
Privacy
- All processing happens locally on your machine
- No data is sent to external servers
- Video metadata is only sent to your local LM Studio instance
License
MIT License