This code simply checks or unchecks (clicks) the checkbox next to merged PRs at https://github.com/notifications. It's frustrating that Github doesn't let you filter on these by default.
Original Source:
[...document.querySelectorAll('.notifications-list-item')].forEach( item => {
if(item.querySelector('.octicon-git-merge, .octicon-git-pull-request-closed')) {
item.querySelector('input[type=checkbox]').click()
}