您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Minimize pics/youtube/wikipedia/tweet previews in chat
// ==UserScript== // @name Minimize pics // @description Minimize pics/youtube/wikipedia/tweet previews in chat // @version 0.1 // @author lois6b // @include *chat.stackexchange.com/rooms/* // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js // @namespace https://gf.qytechs.cn/users/241254 // ==/UserScript== (function() { var img = "https://cdn3.iconfinder.com/data/icons/google-material-design-icons/48/ic_keyboard_arrow_right_48px-128.png"; jQuery("head").append("<style>\ .rotated{\ -webkit-transform : rotate(90deg);\ -moz-transform: rotate(90deg);\ transform: rotate(90deg);\ }\</style>"); function tratar(){ $('.ob-image, .ob-tweet, .ob-wikipedia, .ob-youtube ').each(function(){ var content = $(this).parent(); if(content.children().length == 1){ content.prepend('<img class="minim rotated" width="20px" heigth="20px" src="'+img+'">') content.find('.minim').click(function(){ $(this).parent().find('div[class*=ob]').slideToggle() $(this).hasClass('rotated')? $(this).removeClass('rotated'): $(this).addClass('rotated');}) } }); } let mirador = new MutationObserver(async (records, _) => { tratar(); }) mirador.observe($('#chat')[0], { childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址