MCPcopy
hub / github.com/nsfw-filter/nsfw-filter

github.com/nsfw-filter/nsfw-filter @v3.0.0 sqlite

repository ↗ · DeepWiki ↗ · release v3.0.0 ↗
174 symbols 397 edges 67 files 1 documented · 1%
README

NSFW Filter

A free, open source, and privacy-focused browser extension to block "not safe for work" content.

Images are classified on your device with TensorFlow.js. Nothing is uploaded, and no data leaves your browser.

NSFW Filter ships two models you can switch between in the popup: a small, accurate Vision Transformer (ViT-384) that classifies images as safe or not safe (the default), and the original NSFWJS MobileNet model.

Download now for Google Chrome.

Demo of NSFW Filter extension in action.

Usage

You can install the extension from the Chrome Web Store or source.

When you load web pages, NSFW Filter will first hide all images and only show those classified as safe.

Click the icon in your extensions tab to open the popup. From there you can turn protection on or off, adjust how strict the filter is, choose how flagged images are handled (blur, grayscale, or hide), pick which model does the classifying, and allow specific sites.

NSFW Filter popup

Development

Install dependencies by running:

npm install

Then build the project:

npm run build

To run the tests:

npm run test

To develop with live reload, start a watch build that rebuilds on every change:

npm run dev

Then, in a separate terminal, launch Chromium with the extension loaded. It reloads automatically as the build updates:

npm run start:chrome

To load the build manually instead, open Google Chrome and open the Extensions page by navigating to chrome://extensions or by opening Settings and clicking Extensions from the bottom left.

Enable Developer Mode by clicking the toggle switch.

Click the Load Unpacked button and select the extension directory (.../dist).

Load extension to Chrome in Developer Mode.

Contribute

Please check the Contributor Guidelines before contributing.

Thanks to these wonderful people (emoji key) for helping build and maintain NSFW Filter:

Yegor <3 Yegor <3 💻 🎨 🤔 Navendu Pottekkat Navendu Pottekkat 💻 🖋 📖 🎨 🤔 anonacc anonacc 🐛 Abhiram V V Abhiram V V 💻 🐛 🤔 yxlin118 yxlin118 🐛 🤔 Clay McGinnis Clay McGinnis 👀 Brady Dowling Brady Dowling 🤔
Mike Crittenden Mike Crittenden 📖 garfieldbanks garfieldbanks 🐛 Titus Roby K Titus Roby K 🐛 Haitam Haitam 🐛 lizhendong128 lizhendong128 🐛 Woctor-Dho Woctor-Dho 🤔 miaokun-normal miaokun-normal 🐛
Christopher Bradshaw Christopher Bradshaw 🐛 wingman-jr-addon wingman-jr-addon 🤔 Sagar paul Sagar paul 📖 Rasul Rasul 🐛 💻 Aldulkadir Beceri Aldulkadir Beceri 🐛 silloi silloi 🤔 🐛 💻

This project follows the all-contributors specification. Contributions of any kind are welcome!

Extension points exported contracts — how you extend this code

DefaultTheme (Interface)
(no doc)
src/styled.d.ts

Core symbols most depended-on inside this repo

set
called by 19
src/background/LRUCache.ts
log
called by 18
src/utils/Logger.ts
has
called by 15
src/background/LRUCache.ts
get
called by 12
src/background/LRUCache.ts
analyzeImage
called by 10
src/content/Filter/ImageFilter.ts
getRuntime
called by 9
src/background/background.ts
withTimeout
called by 7
src/utils/withTimeout.ts
error
called by 7
src/utils/Logger.ts

Shape

Method 78
Function 63
Class 32
Interface 1

Languages

TypeScript100%

Modules by API surface

src/offscreen/offscreen.ts11 symbols
src/offscreen/classifiers/BinaryClassifier.ts10 symbols
src/content/Filter/ImageFilter.ts9 symbols
src/offscreen/classifiers/NsfwjsClassifier.ts8 symbols
src/content/DOMWatcher/DOMWatcher.ts8 symbols
src/background/background.ts8 symbols
src/background/Queue/PredictionQueue.ts8 symbols
src/background/Queue/ConcurrentQueue.ts8 symbols
src/background/Model.ts8 symbols
src/background/LRUCache.ts8 symbols
src/utils/messages.ts7 symbols
src/utils/Logger.ts7 symbols

Dependencies from manifests, versioned

@eslint/js9.39.4 · 1×
@tensorflow/tfjs4.22.0 · 1×
@tensorflow/tfjs-backend-wasm4.22.0 · 1×
@types/chrome0.2.0 · 1×
@types/jest30.0.0 · 1×
@types/react19.2.17 · 1×
@types/react-dom19.2.3 · 1×
antd6.5.0 · 1×
copy-webpack-plugin14.0.0 · 1×
cross-env10.1.0 · 1×
eslint9.39.4 · 1×
eslint-plugin-react7.37.5 · 1×

For agents

$ claude mcp add nsfw-filter \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact