Skip to content

Instantly share code, notes, and snippets.

@fnky
Created August 26, 2019 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fnky/2d638ad1523bcf20cc608dde5aef8c79 to your computer and use it in GitHub Desktop.
Save fnky/2d638ad1523bcf20cc608dde5aef8c79 to your computer and use it in GitHub Desktop.
GitHub Snippets
/**
* Marks all closed issues and pull reuqest notifications as read.
*/
(() => {
const closedIssueNodes = document.querySelectorAll('.js-notification .type-icon-state-closed, .js-notification .type-icon-state-merged');
closedIssueNodes.forEach(node => {
node.offsetParent.querySelector('button.delete-note').click();
});
})()
/**
* Marks all issue notifications as read.
*/
(() => {
const issueButtonNodes = document.querySelectorAll('.issue-notification');
issueButtonNodes.forEach(node => {
node.querySelector('button.delete-note').click();
});
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment