hi-pda.com 论坛热度高亮

hipda论坛热度高亮

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        hi-pda.com 论坛热度高亮
// @description:zh-cn  hi-pda.com 论坛热度高亮
// @namespace   www.joyk.com/dig
// @include     https://www.4d4y.com/*
// @version     1.3
// @require     https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.5.1/jquery.min.js
// @grant       none
// @description hipda论坛热度高亮
// ==/UserScript==
var m = function (f) {
    return f.toString().split('\n').slice(1, - 1).join('\n');
}
loadCss = function () {
    var style = document.createElement('style');
    style.type = 'text/css';
    style.textContent = m(function () { /*
           #postlist{border: 1px solid #ccc;}
            #nav, #nav a {
               color: #000000;
            }

            body{
               background:#fff;
            }
            .avatar,.postauthor .profile, .postbottom {
               display:none;
            }
            .t_msgfontfix {
               min-height:0px !important;
            }
            body{
               margin: 0 auto;
                width: 960px;
            }
            .wrap, #nav{
               width:100%;
            }
            a:visited{
                  color:#aaa;
            }
            div#header div.wrap h2{
                  display:none;
            }
            .main{border:1px #ccc solid;}
          */
    });
    var head = document.querySelector('head')
    head.appendChild(style);
};
loadCss();
$(function () {
    
    $('.threadlist tr').each(function () {
        var num = parseInt($('.nums strong', this).text());
        if (num > 20) {
            $(this).css('background', '#FFEBEB')
        }
        if (num > 50) {
            $(this).css('background', '#FFCDCD')
        }
        if (num > 100) {
            $(this).css('background', '#FBAAAA')
        }
        $(this).attr('target', '_blank');
    });
});