Better Literorica

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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