Automatically saves/restores your issue and PR draft comments on Github.
Originated from isaacs/github#376
What this plugin does
- saves every single input in textareas into
localStorage
- restores the saved draft if the focused textarea is empty
- removes the draft on form submit
The darker blue border color around the focused text area (see the gif above) indicates that the plugin is working on the field.
If you wanna clear the saved drafts manually, just do it by yourself. In develper console,
for(let i=0;i<localStorage.length;i++) {
localStorage.key(i).indexOf('github-comment-draft') === 0 && localStorage.removeItem(localStorage.key(i))
}
Caveat: This plugin takes care of input in <textarea />
only. It won't cover the github built in editors like https://github.com/Liooo/github-comment-draft/edit/master/README.md
PRs are welcome.