GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - alexyaroshuk/X_history

BranchesTags
Open more actions menu

Latest commit

 

History

26 Commits
26 Commits

Folders and files

NameName
Last commit message
Last commit date
.claude
.claude
 
 
images
images
 
 
public
public
 
 
src
src
 
 
.gitignore
.gitignore
 
 
MIGRATION_SUMMARY.md
MIGRATION_SUMMARY.md
 
 
README.MD
README.MD
 
 
errors.txt
errors.txt
 
 
fx-post-history.css
fx-post-history.css
 
 
fx-post-popup.css
fx-post-popup.css
 
 
fx-post-shared.css
fx-post-shared.css
 
 
history-styles.css
history-styles.css
 
 
history.html
history.html
 
 
image.png
image.png
 
 
injectSidebar.js
injectSidebar.js
 
 
logs.txt
logs.txt
 
 
manifest.json
manifest.json
 
 
oldcode.css
oldcode.css
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
popup.html
popup.html
 
 
postcss.config.js
postcss.config.js
 
 
service-worker.js
service-worker.js
 
 
styles.css
styles.css
 
 
tailwind.config.js
tailwind.config.js
 
 
tsconfig.json
tsconfig.json
 
 
vite.config.ts
vite.config.ts
 
 

Repository files navigation

X History Chrome Extension

A Chrome extension that tracks and saves X (Twitter) posts you view, with full-text search, masonry grid layout, and offline caching.

šŸš€ Features

  • Automatic Post Tracking: Automatically saves posts you view on X.com
  • Smart Caching: Posts cached in IndexedDB for instant loading and offline access
  • Full-Text Search: Search through saved posts by content, username, or keywords
  • Dual View Modes:
    • Masonry Grid View: Pinterest-style responsive grid layout
    • List View: Compact single-column layout
  • History Manager: Dedicated page for managing your entire post history
  • Dark/Light Theme: Automatic theme detection with manual toggle
  • Infinite Scroll: Smooth pagination (10 posts per page in history, 5 in popup)
  • Import/Export: Backup and restore your post history as JSON
  • TypeScript: Full type safety and better development experience
  • Manifest V3: Future-proof with Chrome's latest extension architecture

šŸ“¦ Tech Stack

  • React 19 - Modern UI framework with hooks
  • TypeScript - Type-safe development
  • Vite 7 - Lightning-fast build tool and dev server
  • @crxjs/vite-plugin - Chrome extension development with HMR
  • Tailwind CSS - Utility-first CSS framework
  • shadcn/ui - Accessible React component library (Button, Card, Input, ScrollArea)
  • Lucide React - Icon library
  • Manifest V3 - Latest Chrome extension architecture
  • IndexedDB - Local database for post caching with full-text search
  • FxTwitter API - Enhanced post data with media, engagement stats, and metadata

šŸ› ļø Installation

For Users (Load Unpacked)

  1. Download or clone this repository
  2. Install dependencies and build:
    npm install
    npm run build
  3. Open Chrome and navigate to chrome://extensions/
  4. Enable Developer Mode (toggle in top right)
  5. Click "Load unpacked" and select the dist folder
  6. Pin the extension to your toolbar

Note: This extension is distributed as "load unpacked" for maximum privacy and control. Your data stays completely local.

For Developers

# Clone the repository
git clone https://github.com/yourusername/x-history.git
cd x-history

# Install dependencies
npm install

# Development mode with hot reload
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

Development workflow:

  • npm run dev starts Vite dev server with HMR (Hot Module Replacement)
  • Changes to React components auto-reload
  • Extension reloads automatically with @crxjs/vite-plugin
  • Build output goes to dist/ folder

šŸ’” Usage

Basic Operation

  1. Browse X.com - Navigate and view posts normally
  2. Automatic Tracking - Posts are automatically saved as you browse
  3. View History - Click the extension icon to see recent posts
  4. History Manager - Click šŸ“‹ button for full history page

Features Guide

šŸ” Search

  • Real-time search as you type
  • Searches post content, usernames, and metadata
  • Multi-word search (all terms must match)
  • Clear button to reset search

šŸŽØ View Modes

  • Grid View: Masonry layout with multiple columns
  • List View: Single column with compact cards
  • Toggle between views with the grid/list buttons

šŸ“Š History Manager

  • View all saved posts in one place
  • Advanced filtering and sorting
  • Export your data as JSON
  • Import previously exported data
  • Bulk management options

šŸŽØ Themes

  • Automatic system theme detection
  • Manual toggle with šŸŒ™/ā˜€ļø button
  • Persists across sessions

šŸ“‚ Project Structure

X_history/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ popup/             # Popup React app (500x600px)
│   │   ā”œā”€ā”€ index.html     # Popup entry HTML
│   │   ā”œā”€ā”€ index.tsx      # React root
│   │   └── Popup.tsx      # Main popup component with infinite scroll
│   ā”œā”€ā”€ history/           # History page React app (full-page manager)
│   │   ā”œā”€ā”€ index.html     # History entry HTML
│   │   ā”œā”€ā”€ index.tsx      # React root
│   │   └── History.tsx    # Main history component with grid/list views
│   ā”œā”€ā”€ components/        # Shared React components
│   │   ā”œā”€ā”€ TweetCard.tsx  # Rich tweet display with media, engagement stats
│   │   └── ui/            # shadcn/ui components (button, card, input, scroll-area)
│   ā”œā”€ā”€ hooks/             # React hooks
│   │   └── useTweetData.ts # FxTwitter API hook with localStorage cache
│   ā”œā”€ā”€ utils/             # Utility functions
│   │   └── enrichPosts.ts # Post enrichment utilities
│   ā”œā”€ā”€ background.ts      # Service worker (Manifest V3) - tracks x.com/*/status/*
│   ā”œā”€ā”€ db.ts              # IndexedDB operations with full-text search
│   ā”œā”€ā”€ sidebar.ts         # Legacy popup script (not used in React version)
│   └── index.css          # Global Tailwind styles
ā”œā”€ā”€ dist/                  # Vite build output (load this folder)
ā”œā”€ā”€ images/                # Extension icons (16, 48, 128)
ā”œā”€ā”€ manifest.json          # Manifest V3 config
ā”œā”€ā”€ vite.config.ts         # Vite configuration with @crxjs/vite-plugin
ā”œā”€ā”€ tailwind.config.js     # Tailwind configuration
ā”œā”€ā”€ tsconfig.json          # TypeScript configuration
└── package.json           # Dependencies

šŸ”§ Development

Key Technologies & Architecture

  • React 19 - Component-based UI with latest features and hooks
  • Vite 7 - Fast builds (~2s) and instant HMR
  • @crxjs/vite-plugin - Chrome extension dev tools with hot reload
  • Tailwind CSS - Utility-first styling with dark mode support
  • shadcn/ui - Pre-built accessible components
  • Chrome Storage API - Stores URLs array (urls key)
  • IndexedDB - Caches full post data with text/username indices for search
  • FxTwitter API - Fetches enhanced post metadata (no auth required)
  • Service Workers - Background URL tracking via webNavigation API
  • localStorage - Caches tweet data by post ID to reduce API calls

Data Flow

  1. Background script monitors x.com navigation → saves URLs to chrome.storage
  2. Popup/History loads URLs → fetches from IndexedDB cache or FxTwitter API
  3. TweetCard displays rich content with useTweetData hook → caches in localStorage

šŸ”’ Privacy

  • 100% Local Storage - All data stays in your browser (chrome.storage, IndexedDB, localStorage)
  • No External Servers - Only connects to X.com (for tracking) and FxTwitter API (for enrichment)
  • No Analytics/Tracking - No telemetry, no third-party trackers
  • No Authentication - FxTwitter API requires no keys or login
  • Easy Data Removal - Clear all data with one click (clears all storage layers)
  • Export Your Data - Full control with JSON export/import
  • Open Source - Inspect the code, modify as needed

šŸ› Troubleshooting

Posts not being tracked?

  • Solution: Ensure you're on x.com (not twitter.com)
  • Check extension permissions in chrome://extensions/
  • Look for navigation to URLs matching x.com/{username}/status/{id}
  • Check background service worker logs in extension details

Posts not showing rich content?

  • Solution: FxTwitter API may be rate-limited or unavailable
  • Posts will fallback to simple URL display
  • Wait a few minutes and refresh
  • Check browser console (F12) for API errors

Search not finding posts?

  • Solution: Search looks in IndexedDB cached posts only
  • Posts must be viewed first (not just tracked) to be searchable
  • Search is case-insensitive and matches text/username
  • Try simpler search terms or reload posts

Theme not applying?

  • Solution: Check system theme preference
  • Use manual theme toggle (šŸŒ™/ā˜€ļø button)
  • Theme preference saved in localStorage

Import/Export issues?

  • Export creates JSON with all post URLs and metadata
  • Import only accepts valid JSON arrays
  • Large imports (>1000 posts) may take 10-30 seconds
  • Extension may be unresponsive during import

Extension icon not showing?

  • Solution: Pin the extension in Chrome toolbar
  • Check if extension is enabled in chrome://extensions/
  • Reload the extension

āš ļø Known Issues & Technical Debt

  • Dual Storage Systems: Both urls array (chrome.storage) and trackedPosts (chrome.storage) exist with migration logic - consider consolidating
  • Legacy Code: sidebar.ts contains old non-React popup implementation (kept for reference, not actively used)
  • API Rate Limits: FxTwitter API has no documented rate limits but may throttle - implement exponential backoff if needed
  • Media Display: Videos may not work for private/deleted posts
  • Pagination: History page loads all posts at once - consider virtualizing for 10k+ posts

šŸ“¦ Distribution

This extension is designed for load unpacked distribution rather than Chrome Web Store:

Why Load Unpacked?

  • āœ… Privacy First - No review process, no external oversight
  • āœ… Full Control - Users can inspect and modify code
  • āœ… Instant Updates - Just rebuild and reload
  • āœ… No Restrictions - Avoid Web Store policies and review delays
  • āœ… Developer Friendly - Perfect for power users and developers

Sharing with Others

To share this extension:

  1. Build the extension:

    npm install
    npm run build
  2. Package the dist folder:

    # Create a zip of the dist folder
    cd dist
    zip -r ../x-history-extension.zip .
  3. Share instructions with users:

    • Extract the zip file
    • Go to chrome://extensions/
    • Enable Developer Mode
    • Click "Load unpacked"
    • Select the extracted folder

Optional: Chrome Web Store

If you want to publish to Chrome Web Store later:

  1. Update manifest.json with proper icons and descriptions
  2. Create promotional images (1280x800, 640x400, etc.)
  3. Create a developer account ($5 one-time fee)
  4. Submit for review (1-2 weeks initial review)

For now, load unpacked is recommended for this privacy-focused tool.

šŸ¤ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

šŸ“„ License

MIT License - see LICENSE file for details

šŸ†˜ Support

For issues or questions:

  1. Check the troubleshooting section above
  2. Open browser DevTools (F12) for error details
  3. Create an issue on GitHub
  4. Include console logs and steps to reproduce

Note: This extension requires Chrome/Edge with Manifest V3 support (Chrome 88+)

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.