Published at: November 14, 2025
Category: projects

Debloat Web

A Chrome browser extension that allows you to select and hide any element on web pages. Hidden elements persist across visits to the same website. Make web less bloated for you.

A Chrome browser extension that allows you to select and hide any element on web pages. Hidden elements persist across visits to the same website. Make web less bloated for you.

Changelog

2025-11-14

2025-11-15 (v1.1.2)

2026-07-10 (v1.1.3)

Features

Installation

  1. Open Chrome and navigate to chrome://extensions/
  2. Enable “Developer mode” using the toggle in the top-right corner
  3. Click “Load unpacked”
  4. Select the ./src/debloatweb directory
  5. The extension should now appear in your extensions list

Usage

Enable/Disable DebloatWeb

At the top of the popup, you’ll find toggle switches for controlling DebloatWeb features:

DebloatWeb Toggle:

Hide Images Toggle:

Hiding Elements

Method 1: Using the Extension Popup

  1. Click the DebloatWeb extension icon in your browser toolbar
  2. Click the “Start Hiding Elements” button
  3. Hover over any element on the page (it will be highlighted with a blue border)
  4. Click the element to hide it
  5. Press ESC or click “Stop Hiding Elements” to exit selection mode

Method 2: Using the Keyboard Shortcut

  1. Press Alt+Shift+H to enter selection mode
  2. Hover and click elements to hide them
  3. Press ESC or Alt+Shift+H again to exit

Managing Hidden Elements

  1. Click the DebloatWeb extension icon to open the popup
  2. You’ll see a list of all hidden elements on the current page
  3. Click “Unhide” next to any element to restore it
  4. Click “Clear All on This Page” to restore all hidden elements

Editing Selectors

  1. In the popup, click on any CSS selector to edit it
  2. Modify the selector text as needed
  3. Press Enter to save or ESC to cancel
  4. The selector will be validated and applied immediately
  5. Invalid selectors will be rejected with an error message

Refreshing Styles

  1. Click the refresh icon (🔄) next to the element count
  2. This will reapply all hidden element styles from storage
  3. Useful when page content changes dynamically or after editing selectors
  4. The button will animate to confirm the refresh

Custom CSS

  1. Scroll to the “Custom CSS for This Site” section in the popup
  2. Write any valid CSS in the textarea (e.g., .ads { display: none !important; })
  3. Click “Apply CSS” to inject the styles into the page
  4. Custom CSS is saved per domain and persists across visits
  5. Click “Clear CSS” to remove all custom styles for the current site
  6. The textarea supports standard CSS syntax with autocomplete disabled for better control

Visual Indicators

Technical Details

File Structure

debloatweb/
├── manifest.json       # Extension configuration
├── popup.html          # Extension popup interface
├── popup.css           # Popup styling
├── popup.js            # Popup functionality
├── content.js          # Page interaction script
├── background.js       # Background service worker
├── styles.css          # Injected page styles
├── icons/              # Extension icons
│   ├── icon16.png
│   ├── icon48.png
│   └── icon128.png
└── README.md          # This file

How It Works

  1. Content Script (content.js): Runs on every page and handles element selection, highlighting, and hiding
  2. Popup (popup.html/js/css): Provides the user interface for managing hidden elements
  3. Background Script (background.js): Handles keyboard shortcuts and extension events
  4. Storage: Uses Chrome’s chrome.storage.sync API to persist hidden elements across devices
  5. CSS Injection: Applies display: none !important to hidden elements via dynamically injected CSS rules

Selector Generation

The extension generates CSS selectors for elements in the following priority:

  1. ID selector (if element has an ID)
  2. Class selector (if unique)
  3. nth-child selector (for specific positioning)
  4. Tag name (fallback)

This ensures hidden elements can be reliably identified even after page reloads.

Limitations

Privacy

Troubleshooting

Extension not working on a page:

Hidden elements reappear:

Keyboard shortcut not working:

License

This extension is provided as-is for personal use.

Screenshots

Comments