Skip to content

Instantly share code, notes, and snippets.

@djpowell
Last active December 28, 2015 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djpowell/7447274 to your computer and use it in GitHub Desktop.
Save djpowell/7447274 to your computer and use it in GitHub Desktop.
Hide everything but pushes from the github newsfeed
// ==UserScript==
// @name GitHub News Feed Pushes Only
// @namespace https://gist.github.com/djpowell/7447274
// @version 0.1
// @description Hide everything but pushes from the github newsfeed
// @match *://github.com
// @copyright 2013, David Powell
// ==/UserScript==
function hideNonNews() {
var els = document.querySelectorAll('#dashboard .alert:not(.push)');
for (var i = 0; i < els.length; i++)
{
var el = els[i];
el.style.display = 'none';
el.parentNode.removeChild(el);
}
}
document.querySelector('.js-events-pagination').addEventListener('click', function(e) {window.setTimeout(hideNonNews, 1500);});
hideNonNews();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment