您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Make the textarea scale to half the screen height, rather than 5 lines
// ==UserScript== // @name Better messages.google.com // @namespace Violentmonkey Scripts // @match https://messages.google.com/web/* // @grant none // @version 1.0 // @license MIT // @author Magnus Anderson // @description Make the textarea scale to half the screen height, rather than 5 lines // @require https://cdn.jsdelivr.net/npm/@violentmonkey/dom@2 // ==/UserScript== const disconnect = VM.observe(document.body, () => { // Find the target node const node = document.querySelector('textarea') if (node) { node.classList.remove('input') node.placeholder = "With every action, you must also cut..." node.value = "" let style = node.style style.backgroundColor = '#00000000' style.border = 'none' style.outline = 'none' style.resize = 'none' style.overflow = 'hidden' style.maxHeight = "50vh" style.color = '#fff' style.fieldSizing = 'content' style.font = 'var(--text-msg-font-override)' style.width = '100%' console.log('magnus!', node) let container = node.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement container.style.position = 'relative' console.log('magnus!2', container) // disconnect observer return true; } });