Skip to content

Instantly share code, notes, and snippets.

@micolous
Created September 26, 2011 05:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save micolous/1241659 to your computer and use it in GitHub Desktop.
Save micolous/1241659 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())';
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