Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

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

DZone's Guide to

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

· Agile Zone
Free Resource

See how three solutions work together to help your teams have the tools they need to deliver quality software quickly. Brought to you in partnership with CA Technologies

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 = '';
}


Discover how TDM Is Essential To Achieving Quality At Speed For Agile, DevOps, And Continuous Delivery. Brought to you in partnership with CA Technologies

Topics:

Published at DZone with permission of Gary Sieling, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}