您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a button to shake an unrevealed fill in a collection
// ==UserScript== // @name AO3: Shake Prompt Fill // @namespace http://tampermonkey.net/ // @version 1.0.0 // @license MIT // @description Adds a button to shake an unrevealed fill in a collection // @author Jamez // @match *://*.archiveofourown.org/collections/*/requests // @match *://*.archiveofourown.org/collections/*/signups/* // @icon http://archiveofourown.org/favicon.ico // @grant none // ==/UserScript== (function($) { $(document).ready(function() { if (!$('body').hasClass('logged-in')) { return; } var base_url = "https://archiveofourown.org/collections/$COLLECTION$/works?commit=Sort+and+Filter&work_search%5Bquery%5D=id%3A$ID$"; $('.index.group li.work').each(function() { var workElement = $(this); var workIdMatch = workElement.attr('id').match(/work_(\d+)/); if (workIdMatch) { var workId = workIdMatch[1]; var mysteryCheck = workElement.find('div.mystery'); if (mysteryCheck.length > 0) { var collectionElement = workElement.find('h5 a'); if (collectionElement.length > 0) { var collectionName = collectionElement.attr('href').split("/")[2]; var workUrl = base_url.replace("$COLLECTION$", collectionName).replace("$ID$", workId); var button = $('<a>', { text: 'Shake Fill', href: workUrl, }); var actions = workElement.find('.actions'); if (actions.length) { actions.append(button); } else { workElement.append(button); } } } } }); }); })(window.jQuery);