// ==UserScript== // @name 方便S1爬楼 // @namespace https://greasyfork.org/users/207890 // @version 1.0 // @description 缩短帖子高度 // @author Ts8zs // @license GPL // @grant GM_addStyle // @run-at document-start // @include /^(?:https://bbs.saraba1st.com/2b/thread-.*.html)$/ // @downloadURL none // ==/UserScript== (function() { let css = ` /* Hide content after the avatar element */ .favatar *:nth-child(n+4) { display: none; } .favatar:hover *:nth-child(n+4) { display: block; } .favatar :has(.avatar) { display: block; } .favatar *:nth-child(3) img:nth-child(2) { display: none; } .t_fsz{ min-height:0; } .avatar{ height:12px; transform:scale(0.3) translate(-120%, -100%); } .t_f img{ max-height: 500px; max-width:100%; height:auto; width:auto; } `; if (typeof GM_addStyle !== "undefined") { GM_addStyle(css); } else { const styleNode = document.createElement("style"); styleNode.appendChild(document.createTextNode(css)); (document.querySelector("head") || document.documentElement).appendChild(styleNode); } })();