Forked from micolous/github-delete-all-notifications.user.js
Created
April 18, 2012 20:19
-
-
Save farmdawgnation/2416292 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); | |
$(document).on('click', '#inbox .del a', function() { | |
setTimeout(function() { | |
document.location.reload(); | |
}, 500); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do I use this to delete notifications? Is it still possible to use it?