A simple Chrome extension that automatically saves your unsent direct message drafts on Twitter/X. Never lose a draft again when you accidentally close a tab or navigate away from a conversation.
- Automatic Draft Saving: Saves your drafts as you type
- Automatic Prefill: Returns your draft when you come back to a conversation
- Draft Management: View and manage all your saved drafts
- Clean UI: Modern, Twitter-inspired interface
- User Privacy: All data is stored locally on your device
- Download or clone this repository
- Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode" (toggle in the top-right corner)
- Click "Load unpacked" and select the extension folder
- The extension is now installed and active
- Simply type in any Twitter DM conversation and your draft will be saved automatically
- When you return to a conversation, your draft will be prefilled
- Click the extension icon to see all your saved drafts
- Use the "Open" button to navigate to a specific conversation
- Delete drafts individually or clear all at once
manifest.json
: Extension configurationcontent.js
: DM detection and draft saving functionalitypopup.html
,popup.css
,popup.js
: UI for viewing and managing draftsimages/
: Icons for the extension
The extension works by:
- Detecting when you're on a Twitter DM page
- Finding the input field and monitoring changes
- Saving drafts to Chrome's local storage
- Detecting when a message is sent to clear the draft
- Prefilling the draft when returning to a conversation
This extension:
- Stores all data locally on your device using Chrome's storage API
- Does not send any data to external servers
- Only activates on Twitter/X message pages
- Only requires permissions for storage and access to Twitter/X URLs
- Support for newlines
- Figure out to how to get the username
- Make sure the UX is better and it works consistently. Sometimes its buggy when you edit existing drafts.
If you encounter any issues or have questions, please file an issue on the repository.
MIT License - Feel free to modify and use as needed.
Sudham Jayanthi -- Vibecoded with <3 at #hsrhackerhouse