{"id":31703817,"url":"https://github.com/genzrizzcode/gmail-htmail","last_synced_at":"2025-10-08T22:44:41.477Z","repository":{"id":316991874,"uuid":"1065522343","full_name":"genZrizzCode/Gmail-HTMaiL","owner":"genZrizzCode","description":"Use HTML in your Gmails!","archived":false,"fork":false,"pushed_at":"2025-09-28T03:27:34.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-28T05:37:57.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/genZrizzCode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-27T22:28:53.000Z","updated_at":"2025-09-28T03:27:37.000Z","dependencies_parsed_at":"2025-09-28T05:37:58.320Z","dependency_job_id":"e6150731-299b-4f5c-8900-bf1b5d58267e","html_url":"https://github.com/genZrizzCode/Gmail-HTMaiL","commit_stats":null,"previous_names":["genzrizzcode/gmail-htmail"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/genZrizzCode/Gmail-HTMaiL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genZrizzCode%2FGmail-HTMaiL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genZrizzCode%2FGmail-HTMaiL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genZrizzCode%2FGmail-HTMaiL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genZrizzCode%2FGmail-HTMaiL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/genZrizzCode","download_url":"https://codeload.github.com/genZrizzCode/Gmail-HTMaiL/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genZrizzCode%2FGmail-HTMaiL/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000779,"owners_count":26082851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-08T22:44:39.882Z","updated_at":"2025-10-08T22:44:41.466Z","avatar_url":"https://github.com/genZrizzCode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **GMAIL** **HTM**ai**L**\n\nA powerful userscript that adds HTML insertion capabilities to Gmail's compose interface. Insert raw HTML directly into your emails with a simple click!\n\n## 🚀 Features\n\n- **Easy HTML Insertion**: Add a `\u003c/\u003e` button to Gmail's compose toolbar\n- **Raw HTML Support**: Insert any HTML content directly into your emails\n- **Smart Editor Tracking**: Automatically detects which compose box you're working in\n- **Paste Event Simulation**: Bypasses Gmail's HTML restrictions using clipboard events\n- **Accessibility**: Includes plain text fallback for screen readers\n- **Auto-Detection**: Works with both compose windows and popup compose boxes\n\n## 📦 Installation\n\n### Option 1: Tampermonkey/Violentmonkey (Recommended)\n\n1. Install a userscript manager:\n   - [Tampermonkey](https://www.tampermonkey.net/) (Chrome, Firefox, Safari, Edge)\n   - [Greasemonkey](https://www.greasespot.net/) (Firefox)\n   - [Violentmonkey](https://violentmonkey.github.io/) (Chrome, Firefox, Edge)\n\n2. Click the \"Raw\" button on this file to install the script\n\n3. The script will automatically update when you visit Gmail\n\n### Option 2: Manual Installation\n\n1. Copy the contents of `htmail.user.js`\n2. Open your userscript manager\n3. Create a new script and paste the code\n4. Save the script\n\n## 🎯 How to Use\n\n1. **Open Gmail** and start composing a new email\n2. **Click the `\u003c/\u003e` button** in the compose toolbar (next to formatting options)\n3. **Enter your HTML code** in the prompt dialog\n4. **Click OK** - the HTML will be inserted at your cursor position\n\n### Example HTML Code\n\n```html\n\u003c!-- Bold text --\u003e\n\u003cstrong\u003eThis text will be bold\u003c/strong\u003e\n\n\u003c!-- Italic text --\u003e\n\u003cem\u003eThis text will be italic\u003c/em\u003e\n\n\u003c!-- Links --\u003e\n\u003ca href=\"https://example.com\"\u003eClick here\u003c/a\u003e\n\n\u003c!-- Images --\u003e\n\u003cimg src=\"https://example.com/image.jpg\" alt=\"Description\" width=\"300\"\u003e\n\n\u003c!-- Styled content --\u003e\n\u003cdiv style=\"background-color: #f0f0f0; padding: 10px; border-radius: 5px;\"\u003e\n  \u003ch3 style=\"color: #333;\"\u003eStyled Header\u003c/h3\u003e\n  \u003cp style=\"color: #666;\"\u003eThis is a styled paragraph\u003c/p\u003e\n\u003c/div\u003e\n\n\u003c!-- Tables --\u003e\n\u003ctable border=\"1\" style=\"border-collapse: collapse;\"\u003e\n  \u003ctr\u003e\n    \u003cth\u003eHeader 1\u003c/th\u003e\n    \u003cth\u003eHeader 2\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eData 1\u003c/td\u003e\n    \u003ctd\u003eData 2\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n```\n\n## 🔧 Technical Details\n\n### How It Works\n\nThe script uses a clever technique to bypass Gmail's HTML restrictions:\n\n1. **Editor Tracking**: Monitors focus events to track the active compose editor\n2. **Paste Simulation**: Creates synthetic clipboard events with HTML data\n3. **DOM Observation**: Uses MutationObserver to detect new compose boxes\n4. **Button Injection**: Dynamically adds the HTML button to compose toolbars\n\n### Browser Compatibility\n\n- ✅ Chrome (with Tampermonkey)\n- ✅ Firefox (with Tampermonkey/Greasemonkey)\n- ✅ Safari (with Tampermonkey)\n- ✅ Edge (with Tampermonkey)\n- ✅ Opera (with Tampermonkey)\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n**\"Please click inside the compose box first!\"**\n- **Solution**: Click anywhere in the email composition area before using the HTML button\n\n**HTML not rendering as expected**\n- **Cause**: Gmail may sanitize certain HTML elements for security\n- **Solution**: Try simpler HTML or check Gmail's HTML support\n\n**Button not appearing**\n- **Cause**: Script may not have loaded properly\n- **Solution**: \n  1. Check browser console for errors\n  2. Refresh Gmail page\n  3. Reinstall the userscript\n\n**Complex CSS not working**\n- **Cause**: Gmail has limited CSS support\n- **Solution**: Use inline styles and test simpler designs\n\n### Debug Mode\n\nOpen your browser's developer console (F12) to see helpful debug messages:\n- `✅ Gmail HTML Compose Helper loaded` - Script loaded successfully\n- `📝 Tracked compose editor` - Editor tracking working\n- `🔧 Inserting HTML` - HTML insertion in progress\n- `✅ HTML insertion completed` - Success!\n\n## 📝 Examples\n\n### Basic Formatting\n```html\n\u003cp\u003e\u003cstrong\u003eImportant:\u003c/strong\u003e This is \u003cem\u003eurgent\u003c/em\u003e!\u003c/p\u003e\n```\n\n### Styled Content\n```html\n\u003cdiv style=\"background: linear-gradient(45deg, #ff6b6b, #4ecdc4); color: white; padding: 20px; border-radius: 10px;\"\u003e\n  \u003ch2\u003eBeautiful Header\u003c/h2\u003e\n  \u003cp\u003eThis content has a gradient background!\u003c/p\u003e\n\u003c/div\u003e\n```\n\n### Email Signature\n```html\n\u003cdiv style=\"border-top: 2px solid #ccc; margin-top: 20px; padding-top: 10px;\"\u003e\n  \u003cp\u003e\u003cstrong\u003eJohn Doe\u003c/strong\u003e\u003cbr\u003e\n  Software Developer\u003cbr\u003e\n  📧 john@example.com | 🌐 www.johndoe.com\u003c/p\u003e\n\u003c/div\u003e\n```\n\n## 🤝 Contributing\n\nFound a bug or have a feature request? We'd love your help!\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Test thoroughly\n5. Submit a pull request\n\n## 📄 License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE.txt](LICENSE.txt) file for details.\n\n## 🙏 Acknowledgments\n\n- Gmail team for the amazing email platform\n- Tampermonkey/Greasemonkey for userscript support\n- The open-source community for inspiration\n\n---\n\n**Made with ❤️ by MaSoVaX**\n\n*Happy HTML composing!* 🎉","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenzrizzcode%2Fgmail-htmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenzrizzcode%2Fgmail-htmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenzrizzcode%2Fgmail-htmail/lists"}