overdrive library - btik links

link from overdrive to btik

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

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 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        overdrive library - btik links
// @namespace   diff
// @include     http*://*.lib.overdrive.com/*/SearchResultsList.htm*
// @include     http*://*.lib.overdrive.com/*/SearchResults.htm*
// @include     http*://*.lib.overdrive.com/*/SearchResultsGrid.htm*
// @include     http*://*.lib.overdrive.com/*/Default.htm*
// @include     http*://*.libraryreserve.com/*/SearchResultsList.htm*
// @include     http*://*.libraryreserve.com/*/SearchResults.htm*
// @include     http*://*.libraryreserve.com/*/SearchResultsGrid.htm*
// @include     http*://*.libraryreserve.com/*/Default.htm*
// @version     0.4
// @grant       none
// @description link from overdrive to btik
// ==/UserScript==

var title = document.querySelectorAll('div[class*="trunc-title-line"]');
for (i=0; elm=title[i]; i++) {
	var str = elm.textContent.trim();
	str = str.replace(/\s+/gi,"+");
	str = escape(str);
	var link = "https://bibliotik.me/torrents/?search=%40title+%22"
		+ str + "%22";
 	elm.innerHTML += " <a href='" + link + "' style='font-size:90%'>[btik]</a>";
}