A browser extension that re-imagines the mediavida.com forum experience with enhanced features, customization options, and quality-of-life improvements.
- Chrome/Edge/Brave: Install from Chrome Web Store
- Firefox: Install from Firefox Add-ons
- Clone this repository
- Install dependencies:
yarn install - Build the extension:
- For Chrome:
yarn build:chromeβ outputs todist-chrome/ - For Firefox:
yarn build:firefoxβ outputs todist-firefox/
- For Chrome:
- Load the extension in your browser:
- Chrome: Go to
chrome://extensions/, enable "Developer mode", click "Load unpacked", select thedist-chrome/folder - Firefox: Go to
about:debugging#/runtime/this-firefox, click "Load Temporary Add-on", select any file in thedist-firefox/folder
- Chrome: Go to
- New Homepage - Custom homepage with quick access to forums, latest news, and featured threads
- Custom Themes - Personalize colors, page width, header, and background
- Dark Mode - Full dark mode support with customizable colors
- No Avatars - Hide all user avatars for a cleaner interface
- No Logo - Remove the site logo for more screen space
- No Side Menu - Hide the sidebar for a focused reading experience
- Monospace Font - Switch to a monospace font for code-like viewing
- Black & White Mode - High contrast black and white display
- Thread Ignoring - Hide threads you're not interested in
- Improved Upvotes - Enhanced upvote display and positioning
- Thread Filtering - Easily manage and filter your thread list
- Custom Usernames - Set custom display names for any user
- Custom Avatars - Replace user avatars with your own images
- Username Colors - Assign custom colors to usernames
- User Notes - Add private notes to user profiles
- Post Border Colors - Highlight specific users' posts with colored borders
- Ignore Users - Hide posts from specific users
- Images in Spoiler - Automatically wrap images in spoiler tags
- YouTube in Spoiler - Auto-spoiler YouTube embeds
- Twitter in Spoiler - Auto-spoiler Twitter/X embeds
- Random Media in Spoiler - Auto-spoiler other embedded media
- Custom Fonts - Choose your preferred font family
- Settings Sync - All settings persist across sessions via localStorage
- Fast Performance - Optimized with React 18 and efficient state management
- Node.js 18+ and yarn
- TypeScript 5.3+
- Framework: React 18 with TypeScript
- State Management: Zustand with localStorage persistence
- Data Fetching: TanStack Query (React Query)
- Styling: Tailwind CSS with dark mode support
- Build Tool: Webpack 5
- Testing: Playwright for E2E tests
# Install dependencies
yarn install
# Development build with watch mode (outputs to dist/)
yarn watch
# Production builds
yarn build:chrome # Build for Chrome β dist-chrome/
yarn build:chrome:zip # Build Chrome + create store-ready zip
yarn build:firefox # Build for Firefox β dist-firefox/
yarn build:firefox:zip # Build Firefox + create store-ready zip
# Clean all build outputs
yarn clean
# Run E2E tests
yarn test
# Run tests with UI
yarn test:ui
# Format code
yarn style
# Fetch HTML snapshots from mediavida.com for development
yarn test:snapshotssrc/
βββ theme-loader.ts # Zero-flash theme CSS injector (runs at document_start)
βββ background.ts # Service worker (extension lifecycle)
βββ popup.tsx # Extension popup UI
βββ injected/ # Content scripts injected into mediavida.com
β βββ index.tsx # Main orchestrator
β βββ threads.tsx # Thread listing enhancements
β βββ thread.tsx # Single thread enhancements
β βββ user.tsx # User profile enhancements
β βββ homepage.tsx # Custom homepage
β βββ utils/ # Utilities (data fetching, page detection)
βββ domains/ # Business logic (DOM parsing)
β βββ forum.ts
β βββ thread.ts
β βββ user.ts
β βββ post.ts
βββ react/ # React components
β βββ popup/ # Popup components
β βββ site/ # Forum enhancement components
βββ utils/
βββ store.ts # Zustand store with persistence
βββ custom-theme.ts # Theme management
The project uses Playwright for E2E testing with the extension loaded in a real browser on mediavida.com.
# Run all tests
yarn test
# Run with Playwright UI (recommended for development)
yarn test:ui
# Run in headed mode (see browser)
yarn test:headed
# Debug tests
yarn test:debugNote: Extension tests require headed mode (extensions don't work in headless browsers).
Fetch and save HTML from mediavida.com for offline selector development:
yarn test:snapshotsThis saves HTML to tests/fixtures/dom-snapshots/ from various pages (homepage, forums, threads, profiles). Use these snapshots to build and test CSS selectors without constant navigation.
-
Theme Loader (
src/theme-loader.ts)- Runs at
document_start(earliest possible timing) - Reads custom theme from localStorage synchronously
- Injects theme CSS before any page rendering
- Prevents flash of default theme (FOUC prevention)
- Runs at
-
Background Service Worker (
src/background.ts)- Manages extension lifecycle
- Injects JavaScript content scripts into forum pages
- Updates extension icon based on current tab
- Handles dynamic theme updates
-
Popup UI (
src/popup.tsx)- Quick access to settings
- Toggle features on/off
-
Content Scripts (
src/injected/)- Detects page type (homepage, threads, profiles)
- Injects React components into existing DOM
- Applies customizations and features
- Uses
showBody()to reveal page after processing (FOUC prevention)
Uses Zustand with localStorage persistence:
- Main Store: Thread ignoring, feature toggles, user customizations
- Theme Store: Custom colors, width, fonts
- All state changes sync immediately to localStorage
- Feature toggles trigger page reload to apply changes
Webpack bundles the extension into separate folders for each browser:
Chrome build (dist-chrome/):
theme-loader.js- Zero-flash theme CSS injector (~2.5KB)popup.js- Extension popupbackground.js- Service worker (Manifest v3 format)mediavida-extension.js- Main content scriptvendor.js- Shared dependencies (React, Zustand, etc.)styles/vendor.css,styles/mediavida.css- Extracted CSS
Firefox build (dist-firefox/):
- Same as Chrome, but with manifest transformed for Firefox compatibility
background.jsuses scripts array instead of service_worker
Store-ready zips:
yarn build:chrome:zipβmv-ignited-chrome.zip(~156KB)yarn build:firefox:zipβmv-ignited-firefox.zip(~156KB)
- CLAUDE.md - Detailed architecture and development guide for AI assistants
- AGENTS.md - Quick reference for AI agents
- BUGBOT.md - Debugging and troubleshooting guide
- tests/README.md - Testing documentation
Contributions are welcome! Please feel free to submit issues or pull requests.
- Commit after every individual piece of work
- Write detailed commit messages suitable for release notes
- Focus on what changed and why it matters to users
MIT License - see LICENSE file for details
Josep Vidal
