Skip to content

Instantly share code, notes, and snippets.

@wy-ei
Last active July 2, 2018 01:42
Show Gist options
  • Save wy-ei/fd15f63183184ff3ee4c933699bb1d57 to your computer and use it in GitHub Desktop.
Save wy-ei/fd15f63183184ff3ee4c933699bb1d57 to your computer and use it in GitHub Desktop.
(function(){
let comments = document.querySelectorAll('.js-minimizable-comment-group');
let list = [];
[].slice.call(comments, 0).forEach(comment => {
let heads = comment.querySelectorAll('.js-comment h2');
let ref = '#' + comment.getAttribute('id');
if(ref.match(/^#issuecomment/)){
[].slice.call(heads, 0).forEach(head => {
list.push(`- [${head.innerHTML}](${ref})`);
});
}
})
console.log(list.join('\n'));
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment