directGelF

direct link to all gelbooru images in search results+

Stan na 04-03-2014. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name          directGelF
// @namespace     directGelF
// @version       1.2
// @description   direct link to all gelbooru images in search results+
// @homepage      https://userscripts.org/scripts/show/137366
// @run-at        document-end
// @grant         GM_openInTab
// @include       http://gelbooru.com/*
// @match         http://gelbooru.com/*
// ==/UserScript==

if (typeof GM_openInTab === "undefined")
{
	GM_openInTab = window.open;
}

var elementos = document.getElementsByClassName("preview");

for(x in elementos) 
{
	// Obtaining the final URL of the image
	var dir = elementos[x].getAttribute('src');
	dir = dir.split('?')[0].split("thumbnails")[1].replace("thumbnail_","");
	dir = "http://simg.gelbooru.com//images" + dir;
	
	// Setting original link to right click
	elementos[x].setAttribute('id',elementos[x].parentNode.href); // save url
    elementos[x].setAttribute('oncontextmenu',"return false;"); // block menu
	elementos[x].addEventListener('contextmenu', function(aEvent) {GM_openInTab(this.id);window.focus();}, true, true); // R-Click

	// Setting the new href
	elementos[x].parentNode.href = dir;
}