Skip to content

sayhi7562/jeffrey-censor-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jeffrey Censor Extension

A Chrome Extension (Manifest V3) that lets you censor any text or image on any webpage by covering it with a black bar. All data stays in chrome.storage.local on your machine — there is no network request of any kind.

Installing as an unpacked extension

  1. Open chrome://extensions
  2. Toggle on Developer mode (top right corner)
  3. Click Load unpacked and select this folder (jeffrey-censor-extension/)
  4. The "Jeffrey Censor" icon will appear in the extensions bar — pin it for quick access

Usage

  1. Open the page you want to censor and click the extension icon to open the popup
  2. Click Start selecting — hovering over an element highlights it with a red outline
  3. Click the element you want to hide → it's instantly covered with a black bar (you can keep selecting more elements without leaving selection mode)
  4. Press ESC to exit selection mode
  5. Click Remove single to enter removal mode — censored bars get a pointer cursor and a yellow hover outline; click one to un-censor just that spot. Press ESC or click the button again to leave removal mode (selecting and removing modes are mutually exclusive)
  6. Click Disable censoring in the popup to hide/show all overlays without deleting any data (click again to re-enable)
  7. Click Clear all to remove every overlay and delete that page's stored data
  8. Try reloading the page (F5) — every censored spot comes back automatically

The badge number on the extension icon shows how many spots are currently censored on the active tab.

Edge cases worth testing

  • Dynamic sites (React/Vue/SPA): censor an element on a page that loads content slowly, then reload — a MutationObserver keeps watching for the element to reappear and re-censors it even if it shows up later
  • Scroll/resize: censor an element, then scroll the page or resize the window — the overlay should always track the element's real position
  • Element removed: censor an element that later gets removed by the site's own JS (e.g. dismissing a banner) — the overlay hides cleanly instead of erroring or floating in the wrong place
  • Multiple pages/paths: data is keyed by hostname + pathname, so each page's censored spots stay isolated from one another
  • Restricted pages: on pages the extension can't access (chrome://extensions, the Chrome Web Store, etc.) the popup shows a clear "unavailable" message instead of failing silently

File structure

jeffrey-censor-extension/
├── manifest.json     # MV3 manifest — permissions: storage, activeTab, scripting
├── content.js        # selection mode, overlays, persist/restore, MutationObserver
├── content.css        # red hover outline + black overlay styling
├── popup.html/js/css  # UI: Start selecting / remove single / toggle / clear buttons
├── background.js      # lightweight service worker that updates the badge count
└── icons/              # 16/48/128px icons

Privacy

  • No fetch/XMLHttpRequest/WebSocket or any network request anywhere in the codebase
  • Only requests the permissions it actually needs: storage (to save selectors locally), plus activeTab + scripting (to run on the tab you're currently viewing)
  • The only thing stored is "the CSS selector of the elements you chose to censor" per page — never the page's actual content

About

A project that wants to test Claude code by writing code to follow the prompt

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors