您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically shortens long Twitch stream titles with hover preview
// ==UserScript== // @name Twitch Title Shortener // @namespace http://tampermonkey.net/ // @version 1.0.1 // @description Automatically shortens long Twitch stream titles with hover preview // @author RM // @match https://www.twitch.tv/* // @grant none // @license MIT // @supportURL https://github.com/ODRise/STwitchT/issues // @homepageURL https://github.com/ODRise/STwitchT // ==/UserScript== (function() { 'use strict'; const style = document.createElement('style'); style.textContent = ` [data-a-target="stream-title"] { max-width: 400px !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; display: inline-block !important; } [data-a-target="stream-title"]:hover { overflow: visible !important; white-space: normal !important; max-width: none !important; position: relative !important; z-index: 9999 !important; background: #18181b !important; padding: 5px !important; border-radius: 4px !important; box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important; } `; document.head.appendChild(style); })();