// ==UserScript== // @name Sto CC One page // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://www.sto.cc/book-*-1.html // @grant GM_addStyle // @require https://code.jquery.com/jquery-3.3.1.min.js // @downloadURL none // ==/UserScript== (function() { $("#BookContent").css("user-select", "text"); document.body.onselectstart = function() {return true;} var pageUrl = []; var pageNum = []; $("#Page_select").children().each(function() { var pU = this.value; var pN = $(this).text(); if (location.pathname != pU) { pageUrl.push(pU); pageNum.push(pN); $("#BookContent").append("
"); } }); while (pageUrl.length > 0) { $.ajax({ url: pageUrl.shift(), pageNum: pageNum.shift(), success: function (data) { //.append("Page " + this.pageNum + "
") $("#page" + this.pageNum).append($(data).find("#BookContent").html().replace(/script/g, "disable")); }, async: true }); } })();