Last active
February 10, 2016 13:43
-
-
Save jajm/31bf1c3aecd5f16c4422 to your computer and use it in GitHub Desktop.
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 hide obs bz | |
// @author Jonathan Druart <[email protected]> | |
// @namespace http://bugs.koha-community.org | |
// @description Hide obsolete patches on Bugzilla | |
// @license the beer-ware license | |
// @grant none | |
// @require http://code.jquery.com/jquery-1.8.3.min.js | |
// @include https://bugs.koha-community.org/* | |
// ==/UserScript== | |
var comment_nodes = $("div.bz_comment"); | |
$(comment_nodes).each(function(){ | |
var comment_text_node = $(this).find('pre.bz_comment_text'); | |
if ( $(comment_text_node).find('span.bz_obsolete').size() > 0 && $(comment_text_node).html().match(/^Created/) ) { | |
$(this).find('a.bz_collapse_comment').click(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment