|
Block-Grab is a professional, dual-purpose browser extension built on Manifest V3. It bundles two independent utility modules into a single lightweight package: 🛡️ AdShield Plus — a high-performance ad blocker that combines Chrome's native 🎬 HD Video / MP3 Downloader — a smart content-grabber that detects active |
|
|
✨ Live data-flow animation — glowing dots travel the connector lines to show requests, messages, and files moving through the system in real time.
📦 Flow Explained
- The content script scans the active page for
<video>elements and injects the floating download button. - On click, the popup / floating UI sends a message via the messaging service to the background service worker.
- The service worker calls the Node.js + Express backend (
http://localhost:5000) with the video/page metadata. - The backend's
videoExtractorservice resolves stream URLs, theaudioConverterhandles MP3 conversion if requested, andfileManagerassembles the final file indownloads/. - Progress events are streamed back to the extension UI, ending with a Save File to Disk prompt.
- In parallel, AdShield Plus runs independently —
declarativeNetRequestrules block known ad domains at the network layer, while cosmetic CSS filters hide remaining ad containers in the DOM.
├── backend/
│ ├── downloads/ # Directory where finalized downloads are stored
│ ├── temp/ # Directory for temporary streaming pieces
│ ├── src/
│ │ ├── controllers/ # Express controllers (download.controller.js)
│ │ ├── middleware/ # Error handling (errorHandler.js)
│ │ ├── routes/ # Express Router mappings (download.routes.js)
│ │ ├── services/ # Services (videoExtractor, audioConverter, fileManager)
│ │ └── server.js # Node/Express application entry
│ ├── .env # Server environment settings
│ └── package.json
│
├── extension/
│ ├── src/
│ │ ├── adblock/ # Rules JSON & Cosmetic CSS filters
│ │ ├── assets/ # Icons and images
│ │ ├── background/ # Background worker Service Worker
│ │ ├── content/ # Page scraper and floating button scripts
│ │ ├── popup/ # Popup page React + HTML
│ │ ├── options/ # Options page React + HTML
│ │ ├── services/ # Storage, messaging, and API services
│ │ └── styles/ # Global styling variables & typography
│ ├── manifest.json # MV3 Chrome/Brave Manifest
│ ├── vite.config.js # Multi-page compiler settings
│ ├── copy-assets.js # Asset bundling script
│ └── package.json
| Layer | Technology |
|---|---|
| Extension UI | React, HTML, CSS, Vite (multi-page build) |
| Extension Core | Manifest V3 Service Worker, declarativeNetRequest |
| Backend API | Node.js, Express |
| Media Processing | Custom video extraction & audio conversion services |
| Storage | Local downloads/ & temp/ directories |
💡 The project has two independent pieces — the backend server and the browser extension — both need to be running for full functionality.
To configure the Express backend server:
# Navigate to the backend directory
cd backend
# Install the Node.js dependencies
npm install
# Start the backend in development mode
npm run devThe backend server will launch at http://localhost:5000.
To compile the Vite/React extension:
# Navigate to the extension directory
cd extension
# Install the development and runtime packages
npm install
# Generate the required icon assets (runs the base64 builder script)
node generate-icons.js
# Build the extension
npm run buildThis compiles all React components and packages resources into the static dist/ directory.
1. Open your browser and navigate to: chrome://extensions
2. Enable "Developer mode" (toggle in the top-right corner)
3. Click "Load unpacked" in the top-left
4. Select the extension/dist folder from this directory
|
|
- Network-level ad blocking via
declarativeNetRequest - Cosmetic DOM filtering for residual ad elements
- Floating draggable download widget
- MP3 audio extraction & conversion
- Up to 4K video download support
- Firefox / Manifest V2 compatibility layer
- Cloud-based download history sync
- Custom user-defined block lists
Contributions, issues, and feature requests are welcome!
# Fork the repo, then:
git checkout -b feature/your-feature-name
git commit -m "Add: your feature"
git push origin feature/your-feature-name
# Open a Pull Request 🚀This project is licensed under the MIT License — feel free to use, modify, and distribute with attribution.