您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Makes subtle improvements to improve readability on fanfiction.net
当前为
// ==UserScript== // @name Fanfiction+ // @namespace DanielVestol.Fanfiction.net // @description Makes subtle improvements to improve readability on fanfiction.net // @include https://www.fanfiction.net/s/* // @version 1.6 // @grant none // ==/UserScript== console.log("DOM fully loaded and parsed"); document.getElementById('content_wrapper').style.maxWidth = '800px'; review = document.getElementById('review'); review.getElementsByTagName('TD')[0].remove(); review.getElementsByTagName('TD')[0].remove(); // Remove element 1 which is now 0 review.getElementsByTagName('DIV')[0].style.maxWidth = '765px'; review.getElementsByTagName('DIV')[0].style.margin = '10px'; document.getElementById('review_name_value').style.maxWidth = '780px'; document.getElementById('review_review').style.maxWidth = '780px'; // Better change between mobile and desktop edition. // Credits to SirCxyrtyx for snippet var mobileVersion = 'location = "https://m.fanfiction.net' + document.location.pathname + '"'; // console.log(mobileVersion); document.getElementsByClassName('icon-kub-mobile')[0].setAttribute('onclick', mobileVersion); // Show whole book function $('#content_wrapper_inner > span:nth-child(7)').append('<button id="myShit" class="btn" type="BUTTON">Show whole book</button>'); document.getElementById('myShit').addEventListener('click', function() { document.getElementById('storytextp').innerHTML = "<div id='topSuprSecret' style='position:fixed;top:100px;left:100px;width:400px;height:70px;background-color:#A2DEF2;'><h1>Loading book...</h1></div>"; $.ajaxSetup({ async: false }); for (i = chapter; i < document.getElementById('chap_select').options.length; i++) { var $div = $('<div>'); $div.load('https://www.fanfiction.net/s/' + document.location.pathname.substr(3, 7) + '/' + i + ' #storytext', function(){ // now $(this)[0].innerHTML contains #storytext $("#storytextp").append($(this)[0].innerHTML); }); } document.getElementById('topSuprSecret').outerHTML = ''; });