Liooo / github-comment-draft

github-comment-draft

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:JavaScript 100.0%