Created
August 26, 2019 07:30
-
-
Save fnky/2d638ad1523bcf20cc608dde5aef8c79 to your computer and use it in GitHub Desktop.
GitHub Snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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(); | |
}); | |
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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