|
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.