Greasy Fork

Greasy Fork is available in English.

智友邦论坛美化

精简多余内容、样式优化、宽屏显示

当前为 2021-08-06 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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    http://greasyfork.icu/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);
    }
})();