Last active
August 29, 2015 13:56
-
-
Save shadyvb/8946540 to your computer and use it in GitHub Desktop.
[userscript] Unassigned filter in GitHub issues screen
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 Unassigned issues filter in GitHub | |
// @namespace | |
// @version 0.1 | |
// @description Add unassigned issue link in issues filters | |
// @match https://github.com/*/*/issues* | |
// @copyright 2014+, Shady Sharaf <shady@sharaf.me> | |
// @see http://stackoverflow.com/questions/9711923/is-there-any-way-show-all-github-tickets-without-an-assignee | |
// ==/UserScript== | |
var fn = function(){ | |
var ul = $('.filter-list.js-pjax-active'), | |
clone = ul.children().last().clone(), | |
anchor = clone.find('a') | |
; | |
if ( clone ) { | |
anchor.attr('href', anchor.attr('href').replace(/mentioned\/[^\/\?]+/, 'assigned/none') ).text('Unassigned'); | |
ul.append(clone); | |
} | |
} | |
$(document).on('pjax:complete', function() { | |
fn(); | |
}); | |
fn(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Preview: