Skip to content

Commit

Permalink
highlight newly inserted comment as send confirmation. kind of fixes s…
Browse files Browse the repository at this point in the history
  • Loading branch information
gka committed Oct 20, 2017
1 parent 5794f5b commit 4c7135c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/embed.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/embed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ import comments_tpl from './comments.jst.html';
console.log(res);
textarea.value = '';
window.localStorage.setItem(`schnack-draft-${slug}`, textarea.value);

if (res.id) {
firstLoad = true;
window.location.hash = '#comment-'+res.id;
}
refresh();
});
});
Expand Down

0 comments on commit 4c7135c

Please sign in to comment.