Skip to content

Instantly share code, notes, and snippets.

@jajm
Last active February 10, 2016 13:43
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 jajm/31bf1c3aecd5f16c4422 to your computer and use it in GitHub Desktop.
Save jajm/31bf1c3aecd5f16c4422 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name hide obs bz
// @author Jonathan Druart <jonathan.druart@bugs.koha-community.org>
// @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