* Initial plan * Add browser extension implementation with core features Co-authored-by: onnwee <211922112+onnwee@users.noreply.github.com> * Update documentation and add extension to build system Co-authored-by: onnwee <211922112+onnwee@users.noreply.github.com> * Add testing guide, SVG icon placeholder, and implementation summary Co-authored-by: onnwee <211922112+onnwee@users.noreply.github.com> * Fix security vulnerabilities: XSS prevention and proper URL encoding Co-authored-by: onnwee <211922112+onnwee@users.noreply.github.com> * Add comprehensive security documentation for browser extension * Fix URL sanitization in platform detector for security Co-authored-by: onnwee <211922112+onnwee@users.noreply.github.com> * Add final implementation report - Browser extension complete Co-authored-by: onnwee <211922112+onnwee@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: onnwee <211922112+onnwee@users.noreply.github.com>
9.8 KiB
9.8 KiB
Internet ID Browser Extension
A browser extension for seamless verification of human-created content across multiple platforms.
Features
- ✅ Platform Detection: Automatically detects YouTube, Twitter/X, Instagram, GitHub, TikTok, and LinkedIn
- ✅ One-Click Verification: Instantly verify content without leaving the platform
- ✅ Visual Badges: Display verification status directly on platform pages
- ✅ Quick Access Popup: Check verification status with a single click
- ✅ Wallet Integration: Connect your wallet for content registration
- ✅ Privacy-Conscious: Configurable auto-verify and caching settings
- ✅ Multi-Browser Support: Designed for Chrome, Firefox, and Safari (Chromium-based browsers initially)
Installation
Development Installation (Chrome/Edge/Brave)
-
Clone the repository and navigate to the extension directory:
cd /path/to/internet-id/extension -
Open Chrome/Edge/Brave and navigate to:
- Chrome:
chrome://extensions - Edge:
edge://extensions - Brave:
brave://extensions
- Chrome:
-
Enable "Developer mode" (toggle in top right)
-
Click "Load unpacked" and select the
extensiondirectory -
The Internet ID Verifier extension should now be installed!
Production Installation
Once published to the Chrome Web Store:
- Visit the Chrome Web Store listing (coming soon)
- Click "Add to Chrome"
- Confirm installation
Configuration
First-Time Setup
- Click the extension icon in your browser toolbar
- Click "Settings" to open the options page
- Configure your API settings:
- API Base URL: Your Internet ID API server URL (default:
http://localhost:3001) - API Key: Optional API key if your server requires authentication
- API Base URL: Your Internet ID API server URL (default:
Settings Overview
API Configuration
- API Base URL: The URL of your Internet ID API server
- API Key: Optional authentication key for protected API endpoints
- Test Connection: Verify your API configuration is working
Verification Settings
- Auto-verify content: Automatically check verification status on supported platforms
- Show verification badges: Display badges directly on platform pages
- Enable notifications: Show desktop notifications for verification status
Appearance
- Theme: Choose between Light, Dark, or Auto (system preference)
Wallet Connection
- Connect Wallet: Link your MetaMask or other Web3 wallet for signing operations
- Enables one-click content registration and verification
Privacy & Data
- Clear Cache: Remove cached verification results (5-minute cache)
- Reset Settings: Restore all settings to default values
Usage
Checking Verification Status
Method 1: Automatic (Recommended)
- Enable "Auto-verify content" in settings
- Visit a supported platform (YouTube, Twitter, etc.)
- Look for the verification badge on verified content
Method 2: Manual Check
- Visit any page on a supported platform
- Click the extension icon
- View verification status in the popup
Verifying New Content
- Visit the content you want to verify
- Click the extension icon
- If not verified, click "Verify Now"
- Follow the instructions in the dashboard
Supported Platforms
| Platform | Detection | Badge Display | Status |
|---|---|---|---|
| YouTube | ✅ | ✅ | Implemented |
| Twitter/X | ✅ | ✅ | Implemented |
| ✅ | 🚧 | Placeholder | |
| GitHub | ✅ | 🚧 | Placeholder |
| TikTok | ✅ | 🚧 | Placeholder |
| ✅ | 🚧 | Placeholder |
Architecture
Extension Components
extension/
├── manifest.json # Extension configuration
├── src/
│ ├── background/
│ │ └── service-worker.js # Background tasks, messaging
│ ├── content/
│ │ ├── youtube.js # YouTube content script
│ │ ├── twitter.js # Twitter/X content script
│ │ ├── instagram.js # Instagram content script
│ │ ├── github.js # GitHub content script
│ │ ├── tiktok.js # TikTok content script
│ │ ├── linkedin.js # LinkedIn content script
│ │ └── styles.css # Badge styles
│ ├── popup/
│ │ ├── popup.html # Extension popup UI
│ │ ├── popup.css # Popup styles
│ │ └── popup.js # Popup logic
│ ├── options/
│ │ ├── options.html # Settings page
│ │ ├── options.css # Settings styles
│ │ └── options.js # Settings logic
│ └── utils/
│ ├── platform-detector.js # Platform detection
│ ├── api-client.js # API communication
│ └── storage.js # Settings storage
└── public/
└── icons/ # Extension icons
Communication Flow
- Content Script detects platform and content ID
- Background Worker receives verification request
- API Client queries Internet ID API
- Cache stores results for 5 minutes
- Badge displays on page if verified
Development
Prerequisites
- Chrome/Chromium-based browser (v88+)
- Internet ID API server running (see main README)
- Node.js (for development tools, optional)
Local Development
- Make changes to extension files
- Reload extension in browser:
- Go to
chrome://extensions - Click reload icon for Internet ID Verifier
- Go to
- Test changes on supported platforms
Testing
Manual Testing Checklist
- Install extension in clean browser profile
- Configure API settings
- Test on YouTube video page
- Test on Twitter/X post
- Verify popup displays correct status
- Test settings persistence
- Test wallet connection
- Verify badge displays correctly
- Test cache clearing
- Test settings reset
Platform-Specific Testing
YouTube:
- Navigate to a verified video
- Check for verification badge below title
- Hover over badge to see tooltip
- Verify extension badge shows checkmark
Twitter/X:
- Navigate to a verified tweet
- Check for verification badge on tweet
- Test with both old and new URLs (twitter.com vs x.com)
Build for Production
For Chrome Web Store submission:
- Test extension thoroughly
- Update version in
manifest.json - Create ZIP file of extension directory:
cd extension zip -r internet-id-extension-v1.0.0.zip . -x "*.git*" -x "*.DS_Store" - Submit to Chrome Web Store Developer Dashboard
Firefox Support
To adapt for Firefox:
- Update
manifest.jsonto Manifest V2 (Firefox requirement) - Change
service_workertobackground.scripts - Update
actiontobrowser_action - Test in Firefox
- Submit to Firefox Add-ons
Safari Support
Safari requires:
- Use Xcode to convert extension
- Build Safari App Extension
- Sign with Apple Developer certificate
- Submit to App Store
Privacy & Permissions
Required Permissions
- storage: Save settings and cache verification results
- activeTab: Access current page URL for verification
- scripting: Inject badges on platform pages
Host Permissions
Access to supported platforms for content script injection:
https://youtube.com/*https://www.youtube.com/*https://twitter.com/*https://x.com/*https://instagram.com/*https://www.instagram.com/*https://github.com/*https://www.tiktok.com/*https://linkedin.com/*https://www.linkedin.com/*
Data Collection
The extension:
- ✅ Does NOT collect personal information
- ✅ Does NOT track browsing history
- ✅ Only sends verification requests to configured API
- ✅ Caches results locally for 5 minutes
- ✅ Stores settings locally in browser
Troubleshooting
Extension Not Working
- Check that API server is running
- Verify API Base URL in settings
- Test API connection in settings
- Check browser console for errors (F12 → Console)
Badge Not Showing
- Ensure "Show verification badges" is enabled
- Refresh the page
- Check if content is actually verified
- Look for errors in console
Verification Always Fails
- Test API connection in settings
- Check API key (if required)
- Verify API server is accessible
- Check network tab for failed requests
Wallet Connection Issues
- Install MetaMask or another Web3 wallet
- Allow extension to connect
- Check wallet is on correct network
- Try disconnecting and reconnecting
Contributing
Contributions are welcome! Please see the main repository CONTRIBUTING.md.
Areas for Contribution
- Complete platform implementations (Instagram, GitHub, TikTok, LinkedIn)
- Improve badge styling and positioning
- Add more wallet providers
- Firefox and Safari ports
- Internationalization (i18n)
- Accessibility improvements
License
MIT License - see LICENSE for details
Support
- GitHub Issues: Report a bug
- Documentation: Main README
- Security: Security Policy
Roadmap
- Chrome/Chromium support (Manifest V3)
- YouTube verification
- Twitter/X verification
- Complete Instagram implementation
- Complete GitHub implementation
- Complete TikTok implementation
- Complete LinkedIn implementation
- Firefox port
- Safari port
- Chrome Web Store publication
- Firefox Add-ons publication
- Safari Extensions publication
- Usage analytics dashboard
- Error reporting integration
- Internationalization (i18n)