Last active
December 15, 2015 23:59
-
-
Save dracos/5344812 to your computer and use it in GitHub Desktop.
This basic GM script adds a "Pull requests only" tickbox to your dashboard issue pages on GitHub; clicking it hides non-PR issues.
It doesn't work over pagination (without a refresh) or other things like that.
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 Assigned Issues Pull Requests tickbox | |
// @namespace github-assigned-issues-pull-requests | |
// @version 1.0 | |
// @description Show only pull requests on the Assigned Issues dashboard page (e.g. https://github.com/dashboard/issues/assigned or the similar org page) | |
// @match *://github.com/dashboard/issues/* | |
// @match *://github.com/organizations/*/dashboard/issues/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// @author Matthew Somerville >> https://github.com/dracos | |
// ==/UserScript== | |
$('.issues-list-options').append('<div class="button-group"><label><input type="checkbox" id="pull_requests_only" value="1"> Pull requests only</label></div>'); | |
$('#pull_requests_only').change(function(){ | |
var lis = $('.mini-icon-issue-opened').add('.mini-icon-issue-closed').closest('li'), | |
count = $('.filter-item.selected span.count'); | |
if ($(this).prop("checked")) { | |
lis.hide(); | |
var c = count.text(); | |
count.data('c', c); | |
count.text(c-lis.length); | |
} else { | |
lis.show(); | |
count.text(count.data('c')); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment