Audible button to search ABB

Adds "ABB" button to Audible

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Audible button to search ABB
// @namespace    https://greasyfork.org/en/users/225782
// @version      0.2
// @description  Adds "ABB" button to Audible
// @author       madnlooney
// @include      https://www.audible.co.uk/pd/*
// @grant        none
// ==/UserScript==

// Get current book title
var title = document.getElementsByTagName("h1")[0].innerHTML;

// Get author
var author = document.getElementsByClassName("authorLabel")[0].getElementsByTagName("a")[0].innerHTML;

// Create search-link for title
var li = document.createElement("li");
var a = document.createElement("a");
a.href = "http://audiobookbay.nl/?s=" + title;
a.target = "_new";
var text = document.createTextNode("[ Search on ABB: Title ]");
a.appendChild(text);
li.appendChild(a);


// Inject title-search on page
var list = document.getElementsByTagName("h1")[0].parentNode.parentNode; //ul
list.appendChild(li);