您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Script to filter bookmarks based on word count. Edit min_len and max_len to taste.
当前为
// ==UserScript== // @name AO3 Filter Bookmarks By Length // @namespace https://greasyfork.org/en/users/296127-doleful-shades // @version 0.1 // @description Script to filter bookmarks based on word count. Edit min_len and max_len to taste. // @author dolefulshades // @match http://archiveofourown.org/*/bookmarks* // @match https://archiveofourown.org/*/bookmarks* // @match http://archiveofourown.org/bookmarks* // @match https://archiveofourown.org/bookmarks* // @grant none // @license MIT // ==/UserScript== // minimum length var min_len = 0; // maximum length var max_len = Infinity; (function($) { var works = $('.bookmarks-index .blurb:has(.stats)'); //all works var words = $(".bookmarks-index .blurb .stats dt:contains('Words:')"); //all "Words:" descriptors before word count //$(words).css('color', 'red'); for(var i=0;i<$(works).length;i++){ var len = $($(words)[i].nextElementSibling).text().replace(',',''); //get word count for each work //console.log(len); if (true && len < min_len||len > max_len) { //if the word count does not fall between min_len and max_len, hide the work //console.log('hid '+len); var work = $(works)[i]; $(work).hide(); } } })(window.jQuery);