Advertisement
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(){
- if ( $(this).find('pre.bz_comment_text > span.bz_obsolete').size() > 0 ) {
- 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);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement