Skip to content

Commit 40a5ad2

Browse files
authored
Update README.md
1 parent 75f350a commit 40a5ad2

1 file changed

Lines changed: 30 additions & 2 deletions

File tree

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,30 @@
1-
# github-comment-draft
2-
github-comment-draft
1+
# Github Comment Draft
2+
3+
Automatically saves/restores your draft comments on Github.
4+
5+
[Chrome web store](https://chrome.google.com/webstore/detail/github-comment-draft/nckohkpmnocinomefhgnofbicepplojh)
6+
7+
![githubcommentdraft-demo](https://user-images.githubusercontent.com/1630378/44530470-68e2ec80-a729-11e8-8164-b443bfc79591.gif)
8+
9+
Originated from https://github.com/isaacs/github/issues/376
10+
11+
-----------------
12+
13+
What this plugin does
14+
15+
1. saves every single input in textareas into `localStorage`
16+
2. restores the saved draft if the focused textarea is empty
17+
3. removes the draft on form submit
18+
19+
The darker blue border color around the focused text area (see the gif above) indicates that the plugin is working on the field.
20+
21+
If you wanna clear the saved drafts manually, just do it by yourself.
22+
In develper console,
23+
24+
```
25+
for(let i=0;i<localStorage.length;i++) {
26+
localStorage.key(i).indexOf('github-comment-draft') === 0 && localStorage.removeItem(localStorage.key(i))
27+
}
28+
```
29+
30+
__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__

0 commit comments

Comments
 (0)