overdrive library - btik links

link from overdrive to btik

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==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>";
}