Forked from micolous/github-delete-all-notifications.user.js
Created
May 27, 2012 16:06
-
-
Save n3bulous/2814895 to your computer and use it in GitHub Desktop.
GitHub: delete all notifications button
This file contains hidden or 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() && setTimeout("document.location.reload()", 500))'; | |
btn.innerHTML = 'Delete all notifications'; | |
var s = document.createElement('span'); | |
s.appendChild(btn); | |
pagination = document.querySelectorAll(".pagination")[0]; | |
pagination.appendChild(s); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment