Read Wattpad full screen

read wattpad full screen. remove all but text. distraction free.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name       Read Wattpad full screen
// @version    0.7
// @match      http://www.wattpad.com/*
// @require http://code.jquery.com/jquery-latest.js
// @description read wattpad full screen. remove all but text. distraction free.
// @namespace https://greasyfork.org/users/5241
// ==/UserScript==

$(document).ready(function() {

	//alert("ok");
    //debugger;

    var text = $('#storyText');
    if (!text.length) return;

    $(window).unbind();
    text.attr("style","padding:15%;margin-right:10%;");
    
    var body = $('body');
    var pagingButtons=$('#pagingButtons');
    var nextChapter=$('#nextChapter');
    var action_bar=$('#action_bar');

    action_bar.find("#library_manage").remove();
    action_bar.find("#share_story").remove();
    action_bar.find("#big_vote_button").append("Vote");
    var style='color:#808080; text-decoration:none; padding:20px;';
    action_bar.attr('style',style).find('a').attr('style',style);
    
    nextChapter.css("margin-right","20%");
    nextChapter.find('a').attr('style','font-weight: bold;color: #808080;text-decoration: none;');
    
    
    pagingButtons
    	.css('margin-right','inherit')
    	.find(".paging_input")
    		.css({
                border: "none",
                "font-size": "19px",
                "text-align": "right",
                "font-family": "Verdana, Helvetica, Arial, sans-serif",
                background: "#FFF",
                color: "#000"
            });

    pagingButtons
    	.find(".prev_page")
    		.css({
                "padding-right": "3px",
                "position": "absolute",
                "margin-left": "-20px",
                "margin-top": "3px"
            });
    
    body.html('<div id=wrapper></div>');
    
    //alert('ok');
    document.open();
    document.write(body.html());
    document.close();
    $.cache = {};
   
    $('#wrapper')
    	.css('width',"110%")
    	.css('overflow-y',"scroll")
    	.css('margin-right',"20%")
        .append(text)
        .append(pagingButtons)
    	.append(nextChapter)
    	.append('<a href=/library style="float:right; text-decoration:none; color:gray; margin-right:inherit">Library</a>')
    	.append(action_bar)

    
    body = $('body');
    body.css({
		"line-height": "150%",
		"word-break": "break-word",
		"text-align": "justify",
		"font-family": "Verdana, Helvetica, Arial, sans-serif",
        "font-size": "larger"
    });

    
    $('#pagingButtons')
       .find("a").attr('onclick','body.animate({scrollTop:0},1000);return nextPageClick();');

    //pgi.replaceWith(pgi.val());
    
    
});