Adventure Gamers gallery expander

Expands all the thumbnails in Adventure Gamers screenshot galleries so that you don't have to visit each screenshot's page.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==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.4
// @grant       GM_addStyle
// ==/UserScript==

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

for (var i = 0; i < thumbs.length; 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
    // https://adventuregamers.com/images/screenshots/28464/screenshots_0012.jpg
	//curImg.src = curImg.src.replace(/__small\./, '__full.');
    curImg.src = curImg.src.replace(/__small\./, '.');
    curImg.dataset.src = curImg.dataset.src && curImg.dataset.src.replace(/__small\./, '.');
	var div = curImg.parentNode.parentNode;
	div.removeAttribute('style');
}

var w = window.innerWidth - 20;
var h = window.innerHeight - 20;
GM_addStyle(`div .thumb_medium { width: 100% !important; margin: 0 !important; padding: 0 !important; float: none !important; }
.fancybox img { max-width: ${w}px; max-height: ${h}px; }
div#main-content { width: 100% !important; margin: 0 !important; padding: 0 !important;}
div#inner-content { width: 100% !important; margin: 0 !important; padding: 0 !important; overflow: visible !important;}
div#middle { width: 100% !important; margin: 0 !important; padding: 0 !important;}
div.cleft { width: 100% !important; margin: 0 !important; padding: 0 !important;}
div.cleft_inn { width: 100% !important; margin: 0 !important; padding: 0 !important;}
.thumb_small img:hover, .thumb_sidebar img:hover, .thumb_medium img:hover { opacity: 1.0 !important; }
`);