您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a 'Follow List' button to the bottom-nav when you're on the last available chapter
// ==UserScript== // @name Royal Road - Follow List Button When No More Chapters // @namespace http://tampermonkey.net/ // @version 2024-02-08 // @description Adds a 'Follow List' button to the bottom-nav when you're on the last available chapter // @author You // @match https://www.royalroad.com/fiction/*/*/chapter/*/* // @icon https://www.google.com/s2/favicons?sz=64&domain=royalroad.com // @require http://code.jquery.com/jquery-3.4.1.min.js // @grant none // @run-at document-end // ==/UserScript== (function() { var followUrl = "https://www.royalroad.com/my/follows"; var nextChapterButton = $('button[disabled="disabled"].btn-primary')[1]; if(nextChapterButton != null){ var button = document.createElement('BUTTON'); button.innerHTML = "Follow<br class='visible-xs'>List"; button.id = "btnFollowListCustom"; button.classList.add("btn"); button.classList.add("btn-primary"); button.classList.add("col-xs-2"); nextChapterButton.parentElement.append(button); $('#btnFollowListCustom').click(function() { window.location.href = followUrl; }); nextChapterButton.outerHTML = nextChapterButton.outerHTML.replace("col-xs-4","col-xs-2"); } })();