Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save n3bulous/2814895 to your computer and use it in GitHub Desktop.
Save n3bulous/2814895 to your computer and use it in GitHub Desktop.
GitHub: delete all notifications button
// ==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