Direct Image Link Booru.org

Показывает прямые ссылки под эскизами

Fra 14.04.2020. Se den seneste versjonen.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name		Direct Image Link Booru.org
// @version		2020.04.14
// @description		Показывает прямые ссылки под эскизами
// @include		http*://*booru.org*
// @author		Rainbow-Spike
// @namespace		https://greasyfork.org/users/7568
// @homepage		https://greasyfork.org/ru/users/7568-dr-yukon
// @icon		https://www.google.com/s2/favicons?domain=booru.org
// @grant		none
// @run-at		document-end
// ==/UserScript==

var spans = document.querySelectorAll ( "span.thumb" ), dlink, dir;

for ( var x in spans ) {
	dir = spans[ x ].querySelector ( "img" )
		.getAttribute ( 'src' )
		.split ( '?' )[ 0 ]
		.replace ( "thumbs2", "img" )
		.replace ( "/furry/" , "/furry/images/" )
		.replace ( "thumbnail_", "" );
	dlink = document.createElement ( 'a' );
	dlink.setAttribute ( 'href', dir );
	dlink.innerHTML = 'Link';

	spans[ x ].appendChild ( document.createElement ( 'br' ) );
	spans[ x ].appendChild ( dlink );
}