Last active
April 1, 2022 16:40
-
-
Save derekaug/e2fb46d9cf8dbc6c680b0bdcd36432c4 to your computer and use it in GitHub Desktop.
Github Notifications Housekeeping Bookmarklet
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
javascript:%22use%20strict%22;void%20function(){document.querySelectorAll(%22.notifications-list-item%22).forEach(function(a){0%3CArray.from(a.querySelectorAll(%22.octicon-git-merge%22)).length%26%26a.querySelector(%22[type=\%22checkbox\%22]%22).click(),0%3CArray.from(a.querySelectorAll(%22.octicon-git-pull-request-closed%22)).length%26%26a.querySelector(%22[type=\%22checkbox\%22]%22).click(),0%3CArray.from(a.querySelectorAll(%22.octicon-git-pull-request-draft%22)).length%26%26a.querySelector(%22[type=\%22checkbox\%22]%22).click(),0%3CArray.from(a.querySelectorAll(%22.octicon-issue-closed%22)).length%26%26a.querySelector(%22[type=\%22checkbox\%22]%22).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
document.querySelectorAll(".notifications-list-item").forEach(function (b) { | |
0 < Array.from(b.querySelectorAll(".octicon-git-merge")).length && b.querySelector('[type="checkbox"]').click(); | |
0 < Array.from(b.querySelectorAll(".octicon-git-pull-request-closed")).length && b.querySelector('[type="checkbox"]').click(); | |
0 < Array.from(b.querySelectorAll(".octicon-git-pull-request-draft")).length && b.querySelector('[type="checkbox"]').click(); | |
0 < Array.from(b.querySelectorAll(".octicon-issue-closed")).length && b.querySelector('[type="checkbox"]').click(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feel free to edit the source to make it work to your liking, I "compiled" it using this tool: https://chriszarate.github.io/bookmarkleter/