Skip to content
RongonKairyPublic

Latest commit

Β 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PureGuard Logo

πŸ›‘οΈ PureGuard

A free browser extension that blocks adult (18+) websites, images, videos and removes ads.

Version License Free No Account

Chrome Edge Brave Firefox Safari

Created by Rongon Kairy


🌟 What is PureGuard?

PureGuard keeps your browsing clean and safe. It blocks adult websites from opening, hides adult images and videos on normal pages, turns on SafeSearch in major search engines, and removes ads and pop-ups β€” all completely free, no account needed, works fully offline inside your browser.

You stay in control. One big shield button switches all protection on or off, and two switches control the adult filter and the ad blocker separately.


πŸ“‹ Table of Contents

# Section
1 Features
2 Install
3 How to Use
4 How It Works
5 Project Structure
6 Permissions
7 Privacy
8 Limitations
9 Troubleshooting
10 FAQ
11 Build from Source
12 Updating Block Lists
13 Roadmap
14 Credits
15 Contributing
16 License

✨ Features

πŸ”ž Adult Content Protection

Feature What it does
🚫 Adult website blocking About 118,000 adult domains blocked. Shows a "This page was blocked" page instead.
πŸ”— Address keyword blocking Blocks URLs containing words like porn, xxx, hentai, xvideo, xnxx.
πŸ–ΌοΈ Embedded content blocking Images, videos, scripts and frames from adult domains are blocked even on normal websites.
πŸ‘οΈ Image and video hiding Images/videos whose filename, alt text, title or surrounding text look adult are hidden.
🏷️ Page label detection Pages with RTA label or rating: adult/mature are blocked automatically.
πŸ“ Title & description check Pages whose title, description or keywords contain adult terms are blocked.
πŸ” SafeSearch Turns on SafeSearch for Google (safe=active), Bing (adlt=strict) and DuckDuckGo (kp=1).

🚫 Ad Blocking

Feature What it does
πŸ“‘ Ad network blocking About 96,000 ad, tracker and pop-up domains blocked.
🎯 Banner hiding Google AdSense, Taboola, Outbrain and "advertisement" containers hidden.

πŸŽ›οΈ Controls & Interface

  • πŸ”˜ One-click on/off shield button β€” toolbar icon shows OFF badge when off
  • βš™οΈ Separate switches for Adult content and Ads
  • πŸ“Š Live status line showing items hidden on current page
  • πŸ”’ Counter of all images and videos hidden so far
  • ⚠️ Clear error message if block lists fail to load
  • β™Ώ Keyboard-friendly and reduced-motion support

πŸ“₯ Install

Download the ZIP for your browser from the Releases page.

Browser ZIP File
Chrome, Edge, Brave, Safari pureguard-chrome-edge-brave-safari.zip
Firefox pureguard-firefox.zip


🟑 Chrome, Edge and Brave

  1. Unzip the file into a folder
  2. Open the extensions page:
    • Chrome β†’ chrome://extensions
    • Edge β†’ edge://extensions
    • Brave β†’ brave://extensions
  3. Turn on Developer mode
  4. Click Load unpacked β†’ select the unzipped folder (the one containing manifest.json)
  5. Refresh every tab that is already open

πŸ’‘ To update: Replace old folder files with new version β†’ click reload icon on PureGuard card β†’ refresh tabs.


🟠 Firefox

  1. Unzip the Firefox file
  2. Open about:debugging#/runtime/this-firefox
  3. Click Load Temporary Add-on β†’ select manifest.json
  4. Open about:addons β†’ PureGuard β†’ Permissions β†’ allow Access your data for all websites

⚠️ Firefox removes temporary add-ons when the browser closes. For a permanent install, the add-on must be signed on addons.mozilla.org.


πŸ”΅ Safari (Mac only)

  1. Install Xcode
  2. In Terminal, run:
    xcrun safari-web-extension-converter /path/to/pureguard
  3. Build and run the generated project in Xcode
  4. Enable PureGuard in Safari β†’ Settings β†’ Extensions

🧭 How to Use

  1. Click the PureGuard icon in the toolbar (pin it from the puzzle-piece menu)
  2. Press the big shield button to turn all protection on or off
  3. Use Adult content and Ads switches to control each part separately
  4. Read the This page line:
    • This page: 3 hidden, 12 blocked β†’ PureGuard is working βœ…
    • Not active on this page yet β†’ Reload the tab
    • Open a website to see activity β†’ Appears on browser pages (new tab, etc.)

Changes take effect immediately β€” no restart needed.


βš™οΈ How It Works (In Detail)

PureGuard has four parts that work together:

1. 🌐 Network Rules (rules/*.json)

The browser's declarativeNetRequest system stops blocked requests before they load.

Rule Set File Contents
adult rules/adult.json ~118,000 adult domains + keyword URL blocking
ads rules/ads.json ~96,000 ad, tracker and pop-up domains
safesearch rules/safesearch.json SafeSearch parameters for Google, Bing, DuckDuckGo

2. πŸ“„ Content Script (content.js)

Runs on every page, at start of loading, in every frame.

  • Checks <img>, <video>, <picture> and <iframe> sources
  • Climbs up 7 DOM levels to find and hide entire adult content cards
  • Re-checks on infinite scroll, lazy loading, and after 1.5, 4 and 9 seconds
  • Hidden elements get visibility: hidden + data-pg-hidden marker

3. πŸͺŸ Popup (popup.html, popup.css, popup.js)

  • Reads/writes settings
  • Shows current tab status
  • Shows blocked request count (Chrome-based)
  • Shows errors if block lists fail

4. 🚫 Blocked Page (blocked.html)

Simple redirect page with Go back button shown when a site is blocked.


πŸ“ Project Structure

pureguard/
β”œβ”€β”€ manifest.json                 # Chrome / Edge / Brave / Safari
β”œβ”€β”€ manifest.firefox.json         # Firefox manifest
β”œβ”€β”€ background.js                 # Switches rule sets on/off
β”œβ”€β”€ content.js                    # Hides adult images/videos, blocks pages
β”œβ”€β”€ popup.html                    # Popup layout
β”œβ”€β”€ popup.css                     # Popup design
β”œβ”€β”€ popup.js                      # Popup logic and status
β”œβ”€β”€ blocked.html                  # Blocked website redirect page
β”œβ”€β”€ blocked.css
β”œβ”€β”€ blocked.js
β”œβ”€β”€ assets/
β”‚   └── logo.png                  # PureGuard logo
β”œβ”€β”€ icons/
β”‚   β”œβ”€β”€ icon16.png
β”‚   β”œβ”€β”€ icon48.png
β”‚   └── icon128.png
β”œβ”€β”€ rules/
β”‚   β”œβ”€β”€ adult.json                # Adult domain rules
β”‚   β”œβ”€β”€ ads.json                  # Ad / pop-up domain rules
β”‚   └── safesearch.json           # SafeSearch rules
└── tools/
    └── build_rules.py            # Regenerates rule files from public lists

πŸ” Permissions

Permission Why it is needed
storage Saves settings and counter on your device
declarativeNetRequest Blocks adult and ad requests
declarativeNetRequestFeedback Shows blocked request count in popup (Chrome only)
<all_urls> Lets content script hide adult images/ads on any website

βœ… PureGuard does not request access to your history, bookmarks, downloads or cookies.


πŸ”’ Privacy

PureGuard does not collect, store or send any personal data or browsing history.

  • βœ… No server
  • βœ… No analytics
  • βœ… No tracking
  • βœ… No account required
  • βœ… All checks happen inside your browser
  • βœ… Only your settings and a counter are saved in local browser storage

⚠️ Limitations

  • Does not look at image pixels β€” blocking is text-based (filenames, alt text, labels). An adult image with no adult words nearby may still appear.
  • Block lists are not perfect β€” new adult/ad domains not yet on the lists won't be blocked until updated.
  • False positives can happen β€” a normal page with words like "adult" or "sexy" near an image may be hidden.
  • Not a parental-control system β€” anyone with browser access can switch it off. Use with OS or router parental controls for children.
  • Firefox needs all-websites permission granted manually, and temporary add-ons disappear on restart.
  • Private/incognito windows only work if you allow the extension in those windows.

πŸ› οΈ Troubleshooting

Problem Fix
Nothing is blocked Refresh the tab. Check shield button says "Protection is on".
Popup says "Not active on this page yet" Reload the tab
New version not showing after update Click reload icon on extension card β†’ refresh tabs
"Block lists failed to load" Reload the extension. If it stays, open Errors on extensions page and report it.
Firefox: nothing happens Allow Access your data for all websites in about:addons β†’ PureGuard β†’ Permissions
A normal website is blocked Turn Adult content switch off β†’ report the site in an Issue
A site looks broken Turn Ads switch off β†’ report the site
"Load unpacked" shows manifest error Select the folder directly containing manifest.json, not a parent folder
Works in normal window, not incognito Enable Allow in Incognito in extension details

❓ FAQ

Is it really free?

Yes. No paid plans, accounts or ads. Free forever.

Does it slow down my browser?

Rules are handled by the browser natively and are very fast.

Does it work on my phone?

Chrome for Android does not support extensions. Firefox for Android supports a limited set. PureGuard has not been tested on phones yet.

Can I add my own sites to block?

Not from the popup yet. You can add domains to EXTRA_ADULT or EXTRA_ADS in tools/build_rules.py and rebuild.

Can I allow one website?

Not yet β€” allow list is on the roadmap.

Why is an image still visible?

PureGuard reads text, not pixels. See Limitations.

Does it block ads on YouTube?

Not reliably. YouTube serves ads from its own domains.


πŸ”¨ Build from Source

# Step 1 β€” Clone the repository
git clone https://github.com/RongonKairy/pureguard.git
cd pureguard

# Step 2 β€” Load as unpacked extension (see Install section)

# Firefox build:
# Copy folder β†’ replace manifest.json with manifest.firefox.json β†’ zip it

# Chrome build:
# Zip the folder without manifest.firefox.json

πŸ”„ Updating the Block Lists

The rules/ files are generated by tools/build_rules.py.

  1. Download the newest lists into a lists/ folder:
File Source
nsfw.txt Hagezi wildcard/nsfw-onlydomains.txt
porn.txt StevenBlack alternates/porn-only/hosts
light.txt Hagezi wildcard/light-onlydomains.txt
popupads.txt Hagezi wildcard/popupads-onlydomains.txt
  1. Run the script:
python3 tools/build_rules.py lists rules
  1. Reload the extension

πŸ—ΊοΈ Roadmap

  • βœ… Allow list ("never block this website") in popup
  • πŸ“ Custom block list in popup
  • πŸ” Optional PIN/password to prevent others switching off
  • πŸ€– On-device image recognition for adult images with no text clues
  • 🌍 Bangla and multi-language interface
  • πŸͺ Published on Chrome Web Store, Edge Add-ons and Firefox Add-ons

πŸ™ Credits

Block lists used to generate the rules:


🀝 Contributing

Bug reports and ideas are welcome!

  • Report a problem: Open an Issue with the website address, browser name/version, PureGuard version, and what you expected.
  • Submit a change: Fork β†’ make change β†’ test as unpacked extension β†’ open a Pull Request.

πŸ“„ License

This project is licensed under the MIT License β€” free to use, share, and modify.

MIT License
Copyright (c) 2026 RongonKairy

PureGuard

PureGuard β€” Browse Clean. Stay Safe. Forever Free.

Β© 2026 Created by Rongon Kairy

GitHub

⭐ If you find PureGuard useful, please give it a star on GitHub!