Last active
December 28, 2015 05:09
-
-
Save djpowell/7447274 to your computer and use it in GitHub Desktop.
Hide everything but pushes from the github newsfeed
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 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