Disclaimer: this is my first Greasemonkey script and I don't know Java or the other scripting languages it uses, but it seems to work. Any tips would be appreciated (like how to ease the install, for starters).
Code:
// ==UserScript==
// @name ScaleAvatars
// @namespace [url]http://jake.org[/url]
// @description scale forum avatars to 120px width
// @include [url]http://forum.halforum.com/*[/url]
// ==/UserScript==
var allImg, thisImg;
allImg = document.evaluate(
\"//img[@alt='User avatar']\",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i = 0; i < allImg.snapshotLength; i++) {
thisImg = allImg.snapshotItem(i);
if (thisImg.width>120){
thisImg.height = thisImg.height/thisImg.width*120;
thisImg.width = 120;
}
}