|
| 1 | +# HTML Email Parser & Contact Finder |
| 2 | + |
| 3 | +A powerful Chrome Extension designed for Lead Generation, Sales, and AdOps professionals. It goes beyond simple regex matching by actively searching for contact information across the current page and automatically fetching related "Contact Us" pages in the background to ensure no lead is missed. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +## Key Features |
| 10 | + |
| 11 | +### 1. Advanced Deep Scanning |
| 12 | +* **DOM Traversal:** Scans not just visible text, but also input values, data attributes (`data-email`, `data-contact`), `href` links, and metadata. |
| 13 | +* **Cloudflare Decoding:** Automatically detects and decodes emails protected by Cloudflare's email obfuscation (`data-cfemail`). |
| 14 | +* **De-obfuscation:** Intelligently reconstructs emails written in anti-bot formats: |
| 15 | + * `user [at] domain [dot] com` |
| 16 | + * `contact (at) site . com` |
| 17 | + * Reversed strings (e.g., `moc.liame@resu`) |
| 18 | + |
| 19 | +### 2. Intelligent "Contact Page" Augmentation |
| 20 | +If no emails are found on the landing page, the extension automatically performs a **background fetch** of common contact paths (without opening new tabs): |
| 21 | +* `/contact`, `/contact-us`, `/contacts` |
| 22 | +* `/about`, `/about-us` |
| 23 | +* `/support`, `/help` |
| 24 | + |
| 25 | +### 3. Smart Filtering & Prioritization |
| 26 | +* **Junk Filter:** Eliminates false positives like image filenames (`image@2x.png`), hashes, Sentry logs, and bundled code artifacts. |
| 27 | +* **Priority Scoring:** Sorts results to show high-value business emails first: |
| 28 | + * Top Priority: `ads@`, `sales@`, `marketing@`, `partners@` |
| 29 | + * High Priority: `support@`, `info@`, `contact@` |
| 30 | + |
| 31 | +## Technical Implementation |
| 32 | + |
| 33 | +* **Manifest V3:** Compliant with modern security standards. |
| 34 | +* **TreeWalker API:** efficient DOM parsing with minimal performance impact. |
| 35 | +* **Regex Engine:** Uses complex patterns to handle HTML entities and variations of email masking. |
| 36 | +* **Background Fetching:** |
| 37 | + ```javascript |
| 38 | + // The script proactively checks adjacent pages if the main page is empty |
| 39 | + const candidatePaths = ["/contact", "/about", "/support"...]; |
| 40 | + fetch(origin + path).then(parseResponse); |
| 41 | + ``` |
| 42 | + |
| 43 | +## Installation (Developer Mode) |
| 44 | + |
| 45 | +1. Clone or download this repository. |
| 46 | +2. Open Chrome and go to `chrome://extensions`. |
| 47 | +3. Enable **Developer mode** (top right toggle). |
| 48 | +4. Click **Load unpacked**. |
| 49 | +5. Select the folder containing `manifest.json`. |
| 50 | + |
| 51 | +## Usage |
| 52 | + |
| 53 | +1. Navigate to any target website. |
| 54 | +2. The extension automatically starts scanning. |
| 55 | +3. Open the extension popup to view results. |
| 56 | + * **Copy:** Copies the email to clipboard. |
| 57 | + * **Mail:** Opens your default email client (`mailto:`). |
| 58 | +4. If the result list is empty, click **"ΠΠ±Π½ΠΎΠ²ΠΈΡΠΈ" (Refresh)** to force a deep re-scan. |
| 59 | + |
| 60 | +## Project Structure |
| 61 | + |
| 62 | +```text |
| 63 | +βββ background.js # Service worker |
| 64 | +βββ content.js # Core logic: Parsing, De-obfuscation, Background Fetching |
| 65 | +βββ manifest.json # Extension configuration |
| 66 | +βββ popup.html # User Interface |
| 67 | +βββ popup.js # UI Logic & Messaging |
| 68 | +βββ styles.css # Styling |
0 commit comments