Skip to content

Repository files navigation

IP Copy - Chrome Extension

A Chrome extension that automatically highlights IPv4 and IPv6 addresses on webpages and provides a convenient popup to copy them as a newline-separated list.

Features

  • Automatic Detection: Instantly highlights all IPv4 and IPv6 addresses on any webpage
  • Visual Highlighting: Yellow background with border for easy identification
  • Smart Collection: Automatically deduplicates IP addresses
  • One-Click Copy: Copy all detected IPs to clipboard with a single click
  • Dynamic Content Support: Detects IPs added to the page after initial load
  • Clean UI: Modern, responsive popup interface with IP count and list
  • Lightweight: Minimal performance impact using efficient DOM scanning

Supported IP Formats

IPv4

  • Standard format: 192.168.1.1
  • Public IPs: 8.8.8.8, 1.1.1.1
  • Private ranges: 10.x.x.x, 172.16-31.x.x, 192.168.x.x
  • Localhost: 127.0.0.1

IPv6

  • Full format: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
  • Compressed: 2001:db8:85a3::8a2e:370:7334
  • Localhost: ::1
  • Link-local: fe80::1
  • IPv4-mapped: ::ffff:192.0.2.1
  • With zone ID: fe80::1%eth0

Installation

Development/Testing

  1. Clone or download this repository
  2. Open Chrome and navigate to chrome://extensions/
  3. Enable "Developer mode" (toggle in top-right)
  4. Click "Load unpacked"
  5. Select the ipcopy directory
  6. The extension icon should appear in your toolbar

From Chrome Web Store

Coming soon - extension pending publication

Usage

  1. Browse any webpage with IP addresses
  2. See automatic highlighting - IPs are immediately highlighted in yellow
  3. Click the extension icon in your toolbar
  4. View the popup showing:
    • Count of unique IPs found
    • Complete list of all detected IPs
  5. Click "Copy All IPs" to copy to clipboard
  6. Paste anywhere - IPs are formatted as a newline-separated list

Project Structure

ipcopy/
├── manifest.json           # Extension configuration (Manifest V3)
├── content.js             # IP detection and highlighting logic
├── popup.html             # Popup interface structure
├── popup.js               # Popup functionality and copy logic
├── styles.css             # Content page highlighting styles
├── popup-styles.css       # Popup interface styles
├── icons/                 # Extension icons
│   ├── icon16.png         # 16x16 icon
│   ├── icon48.png         # 48x48 icon
│   └── icon128.png        # 128x128 icon
├── test-page.html         # Comprehensive test page
├── TESTING.md            # Testing guide and instructions
└── README.md             # This file

Technical Details

Content Script

  • Regex Patterns: Optimized patterns for IPv4 and IPv6 detection
  • DOM Scanning: Uses TreeWalker for efficient text node traversal
  • Smart Wrapping: Wraps detected IPs in styled span elements
  • MutationObserver: Watches for dynamically added content
  • Storage: Uses Chrome's local storage API for data persistence

Popup Interface

  • Modern Design: Clean gradient theme with purple accents
  • Responsive: Adapts to content with scrollable IP list
  • Clipboard API: Uses modern clipboard API with fallback
  • Real-time Updates: Listens for storage changes
  • User Feedback: Shows success/error messages

Permissions

  • activeTab: Access current tab content
  • storage: Store detected IPs
  • <all_urls>: Run on all websites

Testing

  1. Open test-page.html in Chrome
  2. Verify IP highlighting works
  3. Test popup functionality
  4. Try dynamic content features
  5. See TESTING.md for comprehensive test scenarios

Browser Compatibility

  • ✅ Google Chrome (Manifest V3)
  • ✅ Microsoft Edge (Chromium)
  • ✅ Brave Browser
  • ✅ Other Chromium-based browsers
  • ❌ Firefox (requires modifications)
  • ❌ Safari (different extension format)

Known Limitations

  1. May highlight version numbers like "1.2.3.4"
  2. Some websites with strict CSP may limit functionality
  3. Very large pages (>10,000 IPs) may take 1-2 seconds to process

Privacy

This extension:

  • ✅ Works entirely locally (no external servers)
  • ✅ Does not collect or transmit any data
  • ✅ Does not track user behavior
  • ✅ Only accesses page content to detect IPs

Version History

v1.0.0 (August 2026)

  • Initial release
  • IPv4 and IPv6 detection
  • Automatic highlighting
  • Copy to clipboard functionality
  • Dynamic content support

For detailed testing instructions, see TESTING.md

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages