Created
September 26, 2011 05:10
-
-
Save micolous/1241659 to your computer and use it in GitHub Desktop.
GitHub: delete all notifications button
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
// ==UserScript== | |
// @name GitHub delete all notifications button | |
// @namespace http://www.github.com/micolous/delete-all-notifications | |
// @description Adds a button to allow you to delete all notifications on a page. | |
// @include http://github.com/inbox/notifications* | |
// @include https://github.com/inbox/notifications* | |
// ==/UserScript== | |
/* | |
Sick of hipster jerks posting in commit or issue threads, and you made the | |
mistake of contributing something useful in it? This userscript (also Chrome | |
compatible) gives you a handy button to delete all of the notifications on a | |
page. Just visit the notifications page, and this will give you a button to | |
handily delete their crap. | |
*/ | |
(function(){ | |
var btn = document.createElement('a'); | |
btn.className = 'minibutton'; | |
btn.href = 'javascript:void($("#inbox .del a").click())'; | |
btn.innerHTML = 'Delete all notifications'; | |
var p = document.createElement('p'); | |
p.appendChild(btn); | |
var inbox = document.getElementById('inbox'); | |
inbox.appendChild(p); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment