Audible button to search ABB

Adds "ABB" button to Audible

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         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);