Skip to content

Instantly share code, notes, and snippets.

@rcmachado
Created May 12, 2010 18:53
Show Gist options
  • Save rcmachado/398983 to your computer and use it in GitHub Desktop.
Save rcmachado/398983 to your computer and use it in GitHub Desktop.
Greasemonkey script that makes entire bug row clickable on Bugzilla
// ==UserScript==
// @name Bugzilla click-row
// @namespace github.com/rcmachado
// @description Makes an entire row clickable
// @include */buglist.cgi?*
// ==/UserScript==
(function(){
function gotoBug() {
window.location.href = this.getElementsByTagName('a')[0].href;
return false;
}
var lines = document.getElementsByClassName('bz_buglist')[0]
.getElementsByTagName('tbody')[0]
.getElementsByTagName('tr');
// first line is header
for (var i = 1, len = lines.length; i < len; i++) {
lines[i].addEventListener('click', gotoBug, false);
lines[i].style.cursor = 'pointer';
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment