您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds button to let you jump to a certain page of tag results!
// ==UserScript== // @name AO3: [Wrangling] Jump to Page! // @description Adds button to let you jump to a certain page of tag results! // @version 1.0.1 // @author owlwinter // @namespace N/A // @license MIT license // @match *://*.archiveofourown.org/tags/*/wrangle?* // @grant none // ==/UserScript== (function() { 'use strict'; const change_page = function change_page(a) { const old_page = new URL(window.location); const search = old_page.searchParams; search.set("page", a); old_page.search = "?" + search.toString(); window.location = old_page.toString(); } const nextbuttons = document.querySelectorAll("li.next"); for (let a of nextbuttons) { const form = document.createElement("form") const textbox = document.createElement("input"); textbox.type = "text"; textbox.style.paddingLeft = "5px"; textbox.style.paddingRight = "5px"; textbox.style.marginLeft = "10px"; textbox.style.width = "50px"; textbox.style.textAlign = "center" textbox.placeholder = "Jump"; form.appendChild(textbox) form.addEventListener("submit", (e) => { e.preventDefault(); change_page(textbox.value)}); a.parentElement.appendChild(form); } })();