Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==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 http://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(/^Comment on/) ) {
- var show_link = $('<a onclick=\'$(this).siblings("pre.bz_comment_text").show();$(this).hide()\'>Show content</a>');
- $(this).find('pre.bz_comment_text').hide();
- $(this).append(show_link);
- }
- });
Add Comment
Please, Sign In to add comment