A Chromium browser extension that automatically detects dark patterns on any webpage you visit using a Large Language Model (LLM). Dark patterns are deceptive design practices that manipulate users into doing things they might not otherwise do.
Learn more about dark patterns on Deceptive Design.
- Simple Interface: Minimalist design with a "Scan This Page" button
- Pattern Detection: Uses Gemini AI to analyze and identify dark patterns
- Highlighting: Highlight specific dark patterns or all patterns at once
- Informative Tooltips: View descriptions of each dark pattern and how it affects users
- Educational Resource: Links to more information about dark patterns
- Download or clone this repository
- Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode" in the top-right corner
- Click "Load unpacked" and select the extension directory
- Copy
config.template.js
toconfig.js
- Obtain a Gemini API key from Google AI Studio
- Replace
YOUR_GEMINI_API_KEY_HERE
inconfig.js
with your actual API key - The API key is stored locally and NOT shared when you commit code to GitHub
- Click on the extension icon in your browser toolbar
- Click the "Scan This Page" button
- Review the list of detected dark patterns
- Use the "Highlight" buttons to visually identify dark patterns on the page
- Click "Highlight All" to show all detected patterns at once
- Hover over highlighted sections to see information about the dark pattern
This extension uses semantic versioning (MAJOR.MINOR.PATCH):
- MAJOR: Incompatible API changes
- MINOR: New features in a backward-compatible manner
- PATCH: Bug fixes in a backward-compatible manner
Two scripts are provided to help manage versions:
-
version-bump.js: Updates the version in manifest.json
node version-bump.js [patch|minor|major]
-
create-backup.js: Creates a backup ZIP of the current version
npm install archiver # First-time setup node create-backup.js [custom-name]
If you need to roll back to a previous version:
- Unzip the backup file of the version you want to restore
- Load the unpacked extension in Chrome developer mode
- Test thoroughly to ensure it works as expected
See the CHANGELOG.md file for a detailed version history.
- Popup Interface: HTML/CSS/JavaScript that provides the user interface
- Content Script: Handles DOM manipulation and highlighting
- AI Integration: Sends page content to Gemini API for dark pattern detection
- Storage: Saves detection results between page refreshes
This extension was developed as a Final Year (Capstone) project for the Bachelor of Engineering (IT) degree at Pune Institute of Computer Technology (PICT) Pune, by the following students:
This project is licensed under the MIT License - see the LICENSE file for details.