您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a button to fill the tag text in the character field, to search for characters to canonize a rel + Pads common tag separators when actually pasting text into Characters field to fix autocomplete, this allows the names on either side to be recognizable to autocomplete
// ==UserScript== // @name AO3: [Wrangling] Paste Tag into Char Field + pad separators for search // @description Adds a button to fill the tag text in the character field, to search for characters to canonize a rel + Pads common tag separators when actually pasting text into Characters field to fix autocomplete, this allows the names on either side to be recognizable to autocomplete // @version 1.1 // @author Ebonwing (Main paste script), Derpinaz (char paste modif), NexiDava (Pad Separators for Character Autocomplete) // @grant none // @license GPL-3.0 <https://www.gnu.org/licenses/gpl.html> // @match *://*.archiveofourown.org/tags/*/edit // @namespace https://gf.qytechs.cn/en/users/1365489-derpinaz // ==/UserScript== function copyTagChar(){ var text = document.getElementById("tag_name"); var syn = document.getElementById("tag_character_string_autocomplete"); syn.value = text.value.replace(/(?<=[^\s])[/&|]/g, " $&").replace(/[/&|](?=[^\s])/g, "$& "); } (function() { let autocomplete = document.querySelector("input#tag_character_string_autocomplete"); if (!autocomplete) { return; } autocomplete.addEventListener('paste', (event) => { event.preventDefault(); let paste = (event.clipboardData || window.clipboardData).getData('text'); paste = paste.replace(/(?<=[^\s])[/&|]/g, " $&").replace(/[/&|](?=[^\s])/g, "$& "); document.execCommand("insertText", false, paste); }); })(); const button = document.createElement("button") button.type = "button"; button.innerText = "Copy tag into char field" button.addEventListener("click", copyTagChar); var chartext = document.getElementById("tag_character_string").parentNode; chartext.appendChild(button)
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址