driver8 / Adventure Gamers gallery expander

// ==UserScript==
// @name        Adventure Gamers gallery expander
// @namespace   driver8.net
// @description Expands all the thumbnails in Adventure Gamers screenshot galleries so that you don't have to visit each screenshot's page.
// @match     *://*.adventuregamers.com/screenshots/view/*
// @match     *://*.adventuregamers.com/games/view_screenshots/*
// @exclude		http://www.adventuregamers.com/screenshots/view/*/*
// @version     0.1
// @grant       none
// ==/UserScript==


var thumbs = document.querySelectorAll('.thumb_medium img');

for (var i = 0, last = thumbs.length + 1; i < last; i++) {
	var curImg = thumbs[i];
	curImg.removeAttribute('width');
	
	// http://www.adventuregamers.com/images/screenshots/28464/screenshots_0012__small.jpg
	// http://www.adventuregamers.com/images/screenshots/28464/screenshots_0012__full.jpg

	curImg.src = curImg.src.replace(/__small\./, '__full.');
	curImg.parentNode.parentNode.removeAttribute('style');
}