Skip to content

sutariaa/Meta-threading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Meta-Threading Chrome Extension

A Chrome extension that adds Meta-Threading functionality to Gmail, allowing you to easily extract and view email thread information.

Features

  • 🎯 Gmail-only activation: Only runs on mail.google.com
  • 🔘 Floating MT button: Unobtrusive button in the bottom-right corner
  • 📧 Multiple thread scanning: Scans and displays all visible email threads in inbox view
  • 📋 Enhanced popup display: Shows detailed information for each thread (ID, subject, sender, preview)
  • 🔍 Smart detection: Automatically detects if you're in inbox view or thread view
  • 🚀 Manifest V3 compatible: Uses the latest Chrome extension standards
  • 📱 Responsive design: Works on both desktop and mobile Gmail
  • 🌙 Dark mode support: Adapts to your system's dark mode settings

Installation Instructions

Method 1: Load as Unpacked Extension (Recommended for Development)

  1. Download/Clone the extension files

    • Ensure you have these files in a single folder:
      • manifest.json
      • content.js
      • styles.css
      • README.md (this file)
  2. Open Chrome Extension Management

    • Open Google Chrome
    • Navigate to chrome://extensions/ or go to:
      • Chrome menu (⋮) → More tools → Extensions
  3. Enable Developer Mode

    • In the top-right corner of the Extensions page, toggle "Developer mode" ON
  4. Load the Extension

    • Click the "Load unpacked" button (appears after enabling Developer mode)
    • Browse to and select the folder containing the extension files
    • Click "Select Folder"
  5. Verify Installation

    • The extension should now appear in your extensions list
    • You should see "Meta-Threading" with version 1.0
    • Make sure the extension is enabled (toggle should be ON)

Method 2: Pin the Extension (Optional)

  1. Click the Extensions icon (puzzle piece) in Chrome's toolbar
  2. Find "Meta-Threading" in the list
  3. Click the pin icon 📌 next to it to keep it visible in the toolbar

Usage

  1. Navigate to Gmail

  2. Look for the MT Button

    • You should see a circular "MT" button in the bottom-right corner
    • The button has a blue-green gradient and appears after Gmail loads
  3. Click to View Thread Info

    • Click the "MT" button while viewing Gmail
    • In Inbox View: A popup will show all visible email threads with:
      • Thread ID for each email
      • Subject line
      • Sender information
      • Email preview snippet
    • In Thread View: Shows information for the current thread being viewed
    • Use the close button (×) or press Escape to close the popup

File Structure

Meta-threading/
├── manifest.json     # Extension configuration and permissions
├── content.js        # Main JavaScript logic for DOM interaction
├── styles.css        # Styling for the floating button
└── README.md         # This documentation file

Technical Details

Manifest V3 Features

  • Uses content_scripts for Gmail page injection
  • Minimal permissions: only activeTab and host_permissions for Gmail
  • No background scripts needed for this functionality

Gmail Integration

  • Waits for Gmail's dynamic content to load
  • Monitors Gmail navigation changes (single-page app)
  • Multiple fallback methods for extracting thread IDs and subjects
  • Compatible with Gmail's various view modes

Thread ID Extraction Methods

  1. URL parsing: Extracts from Gmail's thread URLs
  2. Data attributes: Reads Gmail's data-thread-id attributes
  3. Hash fragments: Parses thread IDs from URL hash
  4. DOM selectors: Multiple selectors for different Gmail layouts

Troubleshooting

Extension Not Loading

  • Make sure Developer mode is enabled
  • Check that all files are in the same folder
  • Refresh the Extensions page and try loading again

Button Not Appearing

  • Ensure you're on mail.google.com (not other Google services)
  • Wait for Gmail to fully load before expecting the button
  • Check browser console for any JavaScript errors
  • Try refreshing the Gmail page

No Thread Information

  • Make sure you're viewing an actual email thread (not inbox list)
  • Some Gmail views may not have thread information available
  • Check the browser console for debugging information

Permission Issues

  • The extension only needs access to mail.google.com
  • No special permissions or external API keys required

Development

Debugging

  • Open Chrome DevTools (F12) while on Gmail
  • Check the Console tab for extension logs
  • Thread information is logged when the MT button is clicked

Modifying the Extension

  • After making changes to any files, go to chrome://extensions/
  • Click the refresh icon ⟳ on the Meta-Threading extension card
  • Refresh any open Gmail tabs to see changes

Privacy

  • This extension only runs on Gmail pages
  • No data is sent to external servers
  • All thread information is extracted locally from Gmail's DOM
  • No tracking or analytics included

Browser Compatibility

  • ✅ Google Chrome (Manifest V3)
  • ✅ Microsoft Edge (Chromium-based)
  • ❌ Firefox (different extension format)
  • ❌ Safari (different extension format)

Future Enhancements

This basic version can be extended with:

  • Thread export functionality
  • Integration with external APIs
  • Advanced thread analysis
  • Custom styling options
  • Multiple Gmail account support

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors