Greasy Fork

Fimfiction - Verbose

This script changes the tags and ratings to have full text, as well as narrowing the margins on story chapters and a number of other tweaks to site appearance.

目前为 2014-10-11 提交的版本。查看 最新版本

// ==UserScript==
// @name       Fimfiction - Verbose
// @namespace  arcum42
// @author     arcum42
// @version    0.5.5
// @description  This script changes the tags and ratings to have full text, as well as narrowing the margins on story chapters and a number of other tweaks to site appearance.
// @match      http://www.fimfiction.net/*
// @copyright  2014+, You
// ==/UserScript==

//Make the title smaller. Needs work.
$("a.story_name.resize_text").attr("data-start-size", "1.0");

// Change all the categories to have the full category name, not an abbreviation. Use "AU" instead of "Alternate Universe". [story cards]
$("a.story_category").each(function() {
    var txt = $(this).attr("title");
    if (txt == "Alternate Universe") {
        txt = "AU";
    }
    $(this).text(txt);
    $(this).css({"text-transform": "capitalize"});
}
);

// Do the same thing for the ratings. [story cards]
$("ul.story-list li div.right h2 span, .story-card h2 span, .story_content_box div.no_padding div.title div a:first").each(function() {
    var txt = $(this).attr("class").replace("content-rating-","").replace("content_rating_","");
    
    $(this).text(txt);
    $(this).css({"line-height": "20px", "text-transform": "capitalize"});
}
);


// Add the story title to the flip side of the story cards. [story cards]
$(".story-card-container").each(function() {
    $(this).find("div.story-card-reverse-content").before($(this).find("a.story_link").clone());
});
                      
// Those margins on the story page are really big. Change them to %5 on each side. [story chapters]
$("div.inner_margin").css("max-width","90%");

// Go to a new line after the category tags.
$("span.short_description").each(function() {
    $(this).find("a.story_category").last().after("<br/>");
});

// Let's downscale a 64 x 64 avatar to 48 x 48, rather then upscaling the 32 x 32 one, as it looks better. (Consider just making it 64x64?) [Dashboard]
$("img.avatar").each(function() {
    var source = $(this).attr("src");
    //$(this).css({"width":"64","height":"64"});
    $(this).attr("src",source.replace("_32","_64"));
    $(this).append($(this).attr("src"));
});