Better Literorica

This scripts aims to give you more information about the story you are reading.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        Better Literorica
// @namespace   betterliterotica.dekart25.com
// @version     0.4
// @description This scripts aims to give you more information about the story you are reading.
// @include     http*://www.literotica.com/s*/*
// @copyright   2015+, dekart25
// @grant        none
// ==/UserScript==

$(document).ready(function() {
    var title = $(".b-story-header h1").text();
    var userUrl = $(".b-story-header a").attr("href");
    var url = location.href;

    if(url.indexOf("url=") != -1) {
        location.href = url.replace("tories/showstory.php?url=","/");
    }

    if(url.indexOf("http:") != -1) {
        location.href = url.replace("http:","https:");
    }

    //Remover a margin do W
    $("#w").width("100%");
    $("#root").css("margin-right", "500px");

    var minusheight = -1 * ( $(".b-story-body-x").height() + $(".b-story-header").height() + $(".b-breadcrumbs").height() + $(".b-story-stats-block").height() + 60 );
    $("#content .b-sidebar").css("margin-top",minusheight).css("margin-right","-650px").width("600px");

    var pages = $(".b-pager-caption-t").text();

    var box = $(".b-box")[0];
    $(box).find(".b-box-header h3").text("Serie");

    $.get(userUrl, function(data) {
        var rating = $(data).find("a[href=" + url + "]").parent().parent();
        if(rating.size() !== 0)
        {
            $(box).find(".b-box-body").html(rating.html());
        }
        else {
            $(box).find(".b-box-body").html("(x.xx)");
        }
        $(box).find(".b-box-body").append(pages);
        
        var hasNew = $(data).find("img[alt=\"New\"]");
        if(hasNew.length > 0) {
            $(box).find(".b-box-body").append('<img src="https://www.literotica.com/stories/images/memberpage/ico_n.gif" alt="New" width="10" height="11" border="0">'); 
        }
    });

    var lastpage = $("[name=page] option").last().text();
    if(lastpage !== "")
    {
        $.get(url + "?page=" + lastpage, function(data) {
            var serie = $(data).find("#b-series")[0];
            $("#content .b-sidebar").append(serie);

            var tags = $(data).find(".b-s-story-tag-list").parent().parent();
            $("#content .b-sidebar").append(tags);
        });
    }
});