您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
because what wrangler doesn't need a lil fun in their lives ;)
当前为
// ==UserScript== // @name AO3: [Wrangling] Random Bin Button!! // @description because what wrangler doesn't need a lil fun in their lives ;) // @version 1.0.0 // @author owlwinter // @namespace N/A // @license MIT license // @match *://*.archiveofourown.org/tag_wranglers/* // @grant none // ==/UserScript== (function() { 'use strict'; const array = f => Array.prototype.slice.call(f, 0) const unwrangled_label = document.querySelector("#user-page > div.assigned.module > table > thead > tr > th:nth-child(3)"); const btn = document.createElement("button") btn.innerText = "Random bin" btn.style.fontSize = "0.627rem" btn.style.float = "right" unwrangled_label.appendChild(btn) let t = 10 let last = null let interval = null; let choosing = false; btn.addEventListener("click", function(e) { if (choosing) { return; } choosing = true; t = 10; if (interval != null) { clearInterval(interval) } if (last != null) { last.style.backgroundColor = "" } e.preventDefault() const l = array(document.getElementsByTagName("td")).filter(o => o.title.indexOf("unwrangled") != -1 && o.children.length > 0) const fun = function fun() { t = t * 1.4 if (last != null) { last.style.backgroundColor = "" } last = l[Math.round(Math.random() * (l.length - 1))] last.style.backgroundColor = "yellow" if (t > 500) { //last.style.transition = "all 0.3s linear" interval = setInterval(() => { last.style.backgroundColor = last.style.backgroundColor == "lime" ? "yellow" : "lime"; }, 500); choosing = false; } else { setTimeout(fun, t) } } setTimeout(fun, t); }); // Your code here... })();