Goodreads Plus RED

Add "Search RED" button to Goodreads

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name Goodreads Plus RED
// @namespace 
// @version 0.1
// @description Add "Search RED" button to Goodreads
// @author 
// @include http*://www.goodreads.com/* 
// @include http*://goodreads.com/*
// @grant none
// ==/UserScript==

console.log("[M+] Tweaking Goodreads...");

// Grab book title (and only title)
var bookTitle = document.getElementById("bookTitle").innerHTML.trim().split('<', 1);
console.log("Book title: " + bookTitle);
var REDSearchUrl = "https://redacted.ch/torrents.php?groupname=" + bookTitle + "&order_by=time&order_way=desc&group_results=1&filter_cat%5B3%5D=1&filter_cat%5B4%5D=1&filter_cat%5B7%5D=1&action=advanced&searchsubmit=1";

// Add 'Search RED' button
var buttonBar = document.getElementById("buyButtonContainer");
if (buttonBar === null || buttonBar == "null") {
buttonBar = document.getElementById("asyncBuyButtonContainer");
}
var buttonUl = buttonBar.getElementsByTagName("ul");
var REDButton = document.createElement("li");
REDButton.innerHTML = '<a id="REDLink" href="' + REDSearchUrl + '" target="_blank" class="buttonBar">Search RED</a>';
REDButton.className = "Button";
buttonUl[0].appendChild(REDButton);

console.log("[M+] 'Search RED' button added!");