kitapyurdu+

Kitapyurdundaki kitapların ve yazarların Goodreads üzerindeki sayfalarına kolayca ulaşılmasını sağlar

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         kitapyurdu+
// @namespace    http://www.kitapyurdu.com/
// @version      0.1
// @description  Kitapyurdundaki kitapların ve yazarların Goodreads üzerindeki sayfalarına kolayca ulaşılmasını sağlar
// @author       Onur Uslu
// @match        http://kitapyurdu.com/*
// @match        http://www.kitapyurdu.com/*
// @match        https://kitapyurdu.com/*
// @match        https://www.kitapyurdu.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var goodReadsLogo = 'https://s.gr-assets.com/assets/icons/gr-author-badge_23x23.png';

    $('.manufacturers [itemprop=name], .author span[itemprop=name]').each(function(e){
        console.log($(this).html());
       $(this).parent().parent().prepend(
           '<a href="https://www.goodreads.com/search?utf8=%E2%9C%93&q='+
           $(this).text().replace(' ','+')+
           '&search_type=books&search%5Bfield%5D=author"><img src="'+goodReadsLogo+'" style="width: 15px;" alt="G"></a>');
    });
    $('.name').each(function(e){
        if(!$(this).text())
            return;

        $(this).append(
            '<a href="https://www.goodreads.com/search?utf8=%E2%9C%93&q='+
            $(this).text()+
            '&search_type=books&search%5Bfield%5D=title" style="float:right; margin-top: -21px; position:relative;"><img src="'+goodReadsLogo+'" style="width: auto; position: absolute; left:-23px; z-index:999;" alt="G"></a>');
    });

    $('.product-heading').append(
        '<a href="https://www.goodreads.com/search?utf8=%E2%9C%93&q='+
        $('.product-heading').text()+
        '&search_type=books&search%5Bfield%5D=title" style="float:right;"><img src="'+goodReadsLogo+'" alt="G"></a>');


})();