您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add dropdown filter for fiction items
// ==UserScript== // @name Remove items without new chapter // @namespace http://royalroad.com/ // @version 0.2 // @description Add dropdown filter for fiction items // @author You // @match *://www.royalroad.com/my/follows // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; $(document).ready(function() { const hideText = "Hide NoNew"; const showText = "Show All"; function clickHandling() { var allItems = $(".fiction-list-item"); if (toggleButton.text() === hideText) { allItems.each(function() { console.log($(this).text()); if ($(this).text().includes('Last Update & Last Read')) { $(this).hide(); } }); toggleButton.text(showText); } else { allItems.each(function() { $(this).show(); }); toggleButton.text(hideText); } } let toggleButton = $(`<button class="btn btn-circle btn-sm blue">${hideText}</button>`); toggleButton.on('click', function() { clickHandling(); }); $('.actions').prepend(toggleButton); clickHandling(); }); })();