forked from XIU2/UserScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Zhiyoo-Beautification.user.js
59 lines (58 loc) · 1.74 KB
/
Zhiyoo-Beautification.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// ==UserScript==
// @name 智友邦论坛美化
// @version 1.0.2
// @author X.I.U
// @description 精简多余内容、样式优化、宽屏显示
// @icon http://bbs.zhiyoo.net/favicon.ico
// @match *://bbs.zhiyoo.net/*
// @license GPL-3.0 License
// @run-at document-start
// @namespace https://greasyfork.org/scripts/412361
// @supportURL https://github.com/XIU2/UserScript
// @homepageURL https://github.com/XIU2/UserScript
// ==/UserScript==
'use strict';
(function() {
let style_Add = document.createElement('style');
style_Add.innerHTML = `
/* 精简多于内容 */
.forum_top,#main_sidebar,.drag,.nav,.tps,.bm.bml,.ct2 .sd,.mn div.box.cl:nth-of-type(3),#f_pst,.plc.plm,#diy_like1,#hm_qrcode_main,#ft,.po.bbd.reply_p,.ft_top.cl,div a[href="https://weibo.com/372458419"] {
display: none !important;
}
/* 调整主体宽度(因为隐藏了右侧侧栏) */
.ct2 .mn,#wp .forum-left,#thread_types1 {
width: auto !important;
}
/* 隐藏底部 */
#footer {
height: 0 !important;
margin: 0 !important;
}
/* 调整帖子内,标题文字大小 */
#thread_subject {
font-size: 19px !important;
}
/* 调整帖子内,隐藏内容提示区域样式 */
.locked a {
color: #ffffff;
border: 1px dashed #ffffff;
padding: 0 5px 3px;
margin: 0 5px;
font-size: 20px;
background-color: #e24e72;
}
/* 调整帖子内,图片最大宽度(即一排可以放三个图片) */
#postlist .pcb img {
max-width: 30%;
}`;
if (document.head) {
document.head.appendChild(style_Add);
} else {
let timer = setInterval(function(){
if (document.head) {
document.head.appendChild(style_Add);
clearInterval(timer);
}
}, 1);
}
})();