您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Increase maxlength for Edit Public Tags input and changes it to a multiline text area
当前为
// ==UserScript== // @name BlogsMarks - increase maxlength for Edit Public Tags input // @namespace https://blogmarks.net // @version 0.1 // @description Increase maxlength for Edit Public Tags input and changes it to a multiline text area // @author Decembre // @icon https://icons.iconarchive.com/icons/sicons/basic-round-social/48/blogmarks-icon.png // @match https://blogmarks.net/* // @grant none // ==/UserScript== (function() { 'use strict'; console.log("Userscript is running..."); // Function to replace the input field with a textarea function replaceInputWithTextarea() { const inputField = document.getElementById('new-publictags'); // Check if the input field exists and if the textarea does not already exist if (inputField && !document.getElementById('new-publictags-textarea')) { console.log("Input field found, replacing with textarea..."); // Create a new textarea element const textArea = document.createElement('textarea'); textArea.id = 'new-publictags-textarea'; // Set a new ID for the textarea textArea.name = 'public-tags'; // Set the name attribute textArea.rows = 4; // Set the number of visible rows textArea.cols = 52; // Set the number of visible columns (same as size) textArea.maxLength = 500; // Set the maxlength to 500 textArea.value = inputField.value; // Copy the current value // Replace the input field with the textarea inputField.parentNode.replaceChild(textArea, inputField); console.log("Textarea replaced successfully."); } else if (!inputField) { console.log("Input field not found."); } } // Create a MutationObserver to watch for changes in the DOM const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { if (mutation.type === 'childList') { replaceInputWithTextarea(); } }); }); // Start observing the body for changes observer.observe(document.body, { childList: true, subtree: true }); // Initial check in case the input field is already present replaceInputWithTextarea(); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址