Agile Zone is brought to you in partnership with:

Gary Sieling is a software developer interested in dev-ops, database technologies, and machine learning. He has a computer science degree from the Rochester Institute of Technology. He has worked on many products in the legal and regulatory industries, having worked on and supported several data warehousing applications. Gary is a DZone MVB and is not an employee of DZone and has posted 62 posts at DZone. You can read more from them at their website. View Full User Profile

Javascript Snippet to Remove Line Number, Author, Revision Columns from Fisheye/Crucible

06.27.2013
| 2379 views |
  • submit to reddit

Fisheye puts a bunch of useful columns in code reviews, but they’re irritating if you want to copy code out, because they copy too:

I’ve found it helpful to create bulk reviews to view patches, where the code is spread across many repositories (CVS + Git + many revisions + many branches, don’t ask). The following  JavaScript will remove these columns, so you can copy text out in peace:

var nodes = document.body.querySelectorAll(".tetrisColumn, .diffNav, .author, .revision, .diffLineNumbers, .diffLineNumbersA, .diffLineNumbersB");
for (var i = 0; i < nodes.length; i++)
{
  nodes[i].innerHTML = '';
}


Published at DZone with permission of Gary Sieling, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)