Posts Tagged ‘JavaScript’

First bookmarklet :)

Friday, October 12th, 2007

Got somewhat tired of fighting off trac ticket spam and created my first bookmarklet to try and combat it. Now i have a button that closes a bug report in a tenth of the time it took me before :) Next step is to automate it so I can close 20 at same time…

javascript: (function(x) {
document.getElementById("summary").value="None";
document.getElementById("description").value="";
document.getElementById("reporter").value="";
document.getElementById("keywords").value="";
document.getElementById("cc").value="";
document.getElementById("resolve").checked=true;
document.getElementById("resolve_resolution").disabled="";
document.getElementById("resolve_resolution").value="invalid";
document.getElementById("resolve_resolution").form.submit();
})()

All it does is blank out a load of fields, sets the resolution to ‘invalid’ and submits.