A Chrome extension that color-codes posts on X.com (formerly Twitter) based on their age, making it easy to see how recent each post is at a glance. Features a modern Vue 3 settings interface with dark mode support and customizable color options.
-
Multiple Color Modes:
- Both: Background color + border (default)
- Border Only: Just colored borders
- Overlay: Just background colors
- Off: Disable all color coding
-
Age-based Color Coding:
- π’ Green: Very Recent (< 5 minutes)
- π‘ Yellow: Recent (5 minutes - 1 hour)
- π Orange: Moderate (1 - 6 hours)
- π΄ Red: Old (6 - 24 hours)
- π£ Purple: Very Old (> 1 day)
-
Interactive Features:
- Collapsible legend in the top-left corner (toggleable)
- Settings popup with Vue 3 interface
- Dark/Light mode support in settings
- Persistent settings using Chrome storage
- Emergency CSS override to disable all styling
-
Smart Detection:
- Automatic detection of new posts (works with infinite scroll)
- SPA navigation handling for single-page app behavior
- Responsive design for mobile and desktop
-
Prerequisites
- Node.js (version 16 or higher)
- npm or pnpm package manager
-
Clone and Setup
git clone <repository-url> cd chrono-x-chroma # Install dependencies npm install # or pnpm install
-
Build the Extension
npm run build # or pnpm run build -
Load in Chrome
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" in the top-right corner
- Click "Load unpacked" and select the root project folder
- The extension will now be active on X.com
- Open Chrome and navigate to
If you have a pre-built version:
- Download the extension files
- Open
chrome://extensions/in Chrome - Enable "Developer mode"
- Click "Load unpacked" and select the extension folder
- Visit X.com or www.x.com
- Posts will automatically be color-coded based on their age
- A legend appears in the top-left corner showing the color scheme
- Click the "+" button to expand the legend, or "β" to collapse it
- Click the extension icon in your Chrome toolbar
- A modern settings popup will open with options for:
- Color Mode: Choose how posts are styled
- Show Legend: Toggle the legend visibility
- Remove All CSS: Emergency override to disable styling
- Dark/Light Mode: Toggle popup theme
- Reset to Defaults: Restore original settings
- Both (Default): Posts get both background color and colored border
- Border Only: Only adds colored borders to posts
- Overlay: Only adds background color overlay
- Off: Completely disables color coding
The extension uses several sophisticated mechanisms:
- Content Script: Scans the page for posts with
data-testid="tweet" - Time Parsing: Finds
<time datetime="...">elements within each post - Age Calculation: Calculates post age based on datetime attributes
- Dynamic Styling: Applies appropriate colors and effects
- Settings Sync: Uses Chrome storage to persist user preferences
- SPA Handling: Monitors for DOM changes to catch dynamically loaded content
chrono-x-chroma/
βββ manifest.json # Extension configuration
βββ content.js # Main content script logic
βββ styles.css # Legend and styling
βββ src/ # Vue 3 popup source
β βββ popup.html # Popup HTML template
β βββ popup.js # Vue app entry point
β βββ style.css # Tailwind CSS imports
β βββ components/
β βββ PopupApp.vue # Main settings interface
β βββ ColorModeToggle.vue # Color mode selector
β βββ ToggleSwitch.vue # Toggle components
β βββ icons/ # Icon components
βββ dist/ # Built popup files
βββ icons/ # Extension icons
βββ scripts/build.sh # Build script
βββ package.json # Dependencies
- Make changes to source files
- Run
npm run buildto rebuild - Reload extension in
chrome://extensions/ - Test changes on X.com
For UI development, you can use Vite's dev server:
npm run devThis starts a development server at http://localhost:5173 for UI preview (Chrome APIs won't work in browser).
npm run build:extension
# or
./scripts/build.shThis creates a build/ directory and chrono-x-chroma-extension.zip for distribution.
The extension requires minimal permissions:
- activeTab: To interact with X.com pages
- storage: To save user preferences
- No data collection: Everything processed locally
- No external requests: No tracking or analytics
- β Chrome (Manifest V3)
- β Edge (Chromium-based)
- β Brave (Chromium-based)
- β Other Chromium browsers
This extension:
- Local processing only: All calculations done in your browser
- No data collection: Zero telemetry or user tracking
- No external requests: No network calls to external servers
- Content preservation: Never modifies post content, only adds visual styling
- Minimal scope: Only works on X.com domains
- Open source: All code is transparent and auditable
- Ensure you're on x.com or www.x.com
- Try refreshing the page
- Check extension is enabled in
chrome://extensions/ - Verify the build completed successfully
- Check Color Mode setting in popup (might be set to "Off")
- Ensure posts have timestamps (some embedded posts may not work)
- Try different color modes (border/overlay/both)
- Check Chrome storage permissions
- Try disabling/re-enabling the extension
- Clear extension data and reconfigure
- Check "Show Legend" setting in popup
- Legend appears in top-left corner
- On mobile, position may be adjusted
- Ensure Node.js 16+ is installed
- Delete
node_modules/anddist/, thennpm install && npm run build - Check console for build errors
For more detailed troubleshooting, see install_instructions.md.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly on X.com
- Submit a pull request
This project is open source and available under the MIT License.