Guest User

Untitled

a guest
Jan 5th, 2016
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name           hide obs bz
  3. // @author         Jonathan Druart <[email protected]>
  4. // @namespace      http://bugs.koha-community.org
  5. // @description    Hide obsolete patches on Bugzilla
  6. // @license        the beer-ware license
  7. // @grant          none
  8. // @require        http://code.jquery.com/jquery-1.8.3.min.js
  9. // @include        http://bugs.koha-community.org/*
  10. // ==/UserScript==
  11.  
  12. var comment_nodes = $("div.bz_comment");
  13. $(comment_nodes).each(function(){
  14.     var comment_text_node = $(this).find('pre.bz_comment_text');
  15.     if ( $(comment_text_node).find('span.bz_obsolete').size() > 0 && $(comment_text_node).html().match(/^Created/) ) {
  16.         $(this).find('a.bz_collapse_comment').click();
  17.     }
  18. });
Advertisement
Add Comment
Please, Sign In to add comment