Discuz! X3.4 帖子界面样式精简示例 (Hostloc.com)

date
Aug 25, 2024
slug
discuz-x34-minimal-post-styles
status
Published
tags
AdGuard
summary
我不想知道你是「论坛神仙」, 也不想看你彩虹一样的签名(aka 广告栏), 更不想看略带惊喜(惊吓)效果的用户头像.
type
Post
url

前言

既然 AdGuard 能给网页删除元素, 注入样式, 那就别怪我把 AdGuard 当成 UserStyle 管理器了!
虽然还能注入自定义 JavaScript, 但是不如直接去用 UserScript, 大概.

规则

将下面的规则添加到你的用户过滤器中:
规则不包含去广告功能.
/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/$replace=/<li class="pm2"><a href="(.*?)" title="发消息" class="xi2">发消息<\/a><\/li>/<a href="\$1"><img src="https:\/\/hostloc\.com\/static\/image\/common\/pmto\.gif"><\/a>/ /^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/$replace=/<style type="text\/css">#pid[0-9]+{background-image:url\("static\/image\/postbg\/.*?\.[a-z]+"\);}<\/style>// ||hostloc.com/uc_server/data/avatar^$urltransform=/^https?:\/\/hostloc\.com\/uc_server\/data\/avatar\/.*?$/https:\/\/hostloc.com\/uc_server\/images\/noavatar_middle\.gif/ [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]#?#p:has(> em:has(> a:matches-attr(href="/^home\.php\?mod=spacecp&ac=usergroup.*?$/"))) [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]#?#p:has(> span:has(> img:matches-attr(alt="Rank:*"))) [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]##.tns.xg2 [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]##div.tshare.cl [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]##dl.pil.cl [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]##p > span.pbg2 [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]##p.md_ctrl [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]##p.xg1 [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]#$#.pls .avatar img { width: 32px !important; } [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]#$#.pls { width: 100px !important; } [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]#$#.pm2 { background-image: none !important; } [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]#$#.psti { font-size: 14px; } [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]#$#.t_f { font-size: 16px !important; } [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]#$##table.plhin { background-image: none !important; } [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]#$#div.sign { color: gray !important; font-size: 10px; font-family: monospace; font-weight: 100; } [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]#$#div.sign * { color: gray !important; font-size: 10px; font-family: monospace; font-weight: 100; } [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]#$#table.t_table { background-color: #ffffff00 !important; } [$url=/^https?:\/\/hostloc\.com\/(?:(?:forum\.php)|(?:thread)).*$/]#$#td > img { max-height: 120px; width: auto; }
  • 重定向用户自定义头像为默认头像. (某些头像实在是有点 NSFW, 况且我也不想看别人的个性化.)
  • 隐藏用户荣誉, 称号. (你多少级多少经验跟我有什么关系?)
  • 调整帖子正文字体大小固定为 16px. (默认字体大小瞎眼, 自定义更瞎眼)
  • 调整帖子内嵌图片固定高度为 120px. (总有些长截图差点捅穿我的屏幕)
  • 删除帖子背景图像.
  • 调整用户签名字体大小为固定 10px, 字体颜色为灰色, 等宽字体, 签名背景色为透明. (签名? 广告栏!)
  • 调整楼内回复字体大小为 14px.
  • 移除帖子一楼的分享按钮栏.

对比预览

notion image
notion image
notion image
notion image
notion image
notion image
 

© CXPLAY 2024