kitapyurdu+

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==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>');


})();