Skip to content

Liooo/github-comment-draft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Comment Draft

Automatically saves/restores your issue and PR draft comments on Github.

Chrome web store

githubcommentdraft-demo-prissue

githubcommentdraft-demo

Originated from isaacs/github#376


What this plugin does

  1. saves every single input in textareas into localStorage
  2. restores the saved draft if the focused textarea is empty
  3. 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.

About

github-comment-draft

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages