var inc = 0;
var x = content.document.getElementsByClassName('r');
for(i in x)
x[i].innerHTML = (++inc)+'. '+x[i].innerHTML;
I guess whoever wrote the code you referred to made a plugin out of it, giving you the ease of clicking a button.