Sleazy Fork is available in English.

[Konachan / yande.re] Thumbnails: Fix Highres Link

*Does not work on wiki pages* (1) Changes the links below thumbnails to link to the original PNG instead of the highres JPEG. • (2) Changes the image size shown below thumbnails to the size of the original PNG which can be different for large images.

От 30.11.2014. Виж последната версия.

// ==UserScript==
// @name		[Konachan / yande.re] Thumbnails: Fix Highres Link
// @namespace	Zolxys
// @description	*Does not work on wiki pages* (1) Changes the links below thumbnails to link to the original PNG instead of the highres JPEG. • (2) Changes the image size shown below thumbnails to the size of the original PNG which can be different for large images.
// @include		/^https?://konachan\.(com|net)/(post(/similar(/\d+)?)?|user/show/\d+)/?($|\?|#)/
// @include		/^https?://yande\.re/(post(/similar(/\d+)?)?|user/show/\d+)/?($|\?|#)/
// @version		1.2
// ==/UserScript==
if (document.getElementById('post-list-posts') == null)
	return;
var f = String(function(){
	var zola = document.getElementsByTagName('li'); // Searches from document instead of id 'post-list-posts' because that id occurs multiple times on the profile page.
	for (var zoli = 0; zoli < zola.length; ++zoli) {
		if (!/^p\d+$/.test(zola[zoli].id))
			continue;
		if (!/(^|\s)creator-id-\d+(\s|$)/.test(zola[zoli].className))
			continue;
		var zoln = parseInt(zola[zoli].id.substr(1));
		var zols = zola[zoli].getElementsByTagName('span');
		for (var zolp = 0; zolp < zols.length; ++zolp) 
		  if (zols[zolp].childElementCount == 0 && /(^|\s)directlink-res(\s|$)/.test(zols[zolp].className)) {
			zols[zolp].textContent = Post.posts._object[zoln].width +' × '+ Post.posts._object[zoln].height;
			if (zols[zolp].parentNode.nodeName != 'A')
				continue;
			zols[zolp].parentNode.href = Post.posts._object[zoln].file_url;
		}
	}
});
var ne = document.createElement('script');
ne.setAttribute('type','text/javascript');
ne.innerHTML=f.substring(f.indexOf('\n') + 1, f.lastIndexOf('}'));
document.head.appendChild(ne);