Greasy Fork is available in English.

MCBBS 积分显示还原

8月更新不习惯?那就还原至8月更新以前吧!

12.08.2020 itibariyledir. En son verisyonu görün.

// ==UserScript==
// @name         MCBBS 积分显示还原
// @version      0.0.1
// @description  8月更新不习惯?那就还原至8月更新以前吧!
// @author       萌萌哒丶九灬书
// @namespace    https://space.bilibili.com/1501743
// @license      GNU General Public License v3.0
// @match        *://www.mcbbs.net/thread-*
// @match        *://www.mcbbs.net/forum.php?mod=viewthread*
// @grant        none
// @require      https://cdn.staticfile.org/jquery/1.12.4/jquery.min.js
// ==/UserScript==

(function() {
    'use strict';
    var jq = jQuery.noConflict();
    //jq名称重定义,避免冲突
    var i = 0;
    jq(document).ready(function(){
        jq(".pil.cl").each(function(){
            var str1 = jq(".pil.cl").eq(i).text();
            var str2 = jq(".i.y").children(".cl").eq(i).text();
            var jf = str2.match(/积分\d+/);
            var rq = str2.match(/人气\d+/);
            var gx = str2.match(/贡献\d+/);
            var ax = str2.match(/爱心\d+/);
            var jl = str1.match(/金粒\d+/);
            var bs = str1.match(/宝石\d+/);
            var zs = str2.match(/钻石\d+/);

            var jf_int = jf[0].match(/\d+/);
            var rq_int = rq[0].match(/\d+/);
            var gx_int = gx[0].match(/\d+/);
            var ax_int = ax[0].match(/\d+/);
            var jl_int = jl[0].match(/\d+/);
            var bs_int = bs[0].match(/\d+/);
            var zs_int = zs[0].match(/\d+/);

            var str3 = "<dt>积分</dt><dd>" + jf_int.toString() + "</dd>" +
                "<dt>人气</dt><dd>" + rq_int.toString() + " 点</dd>" +
                "<dt>贡献</dt><dd>" + gx_int.toString() + " 份</dd>" +
                "<dt>爱心</dt><dd>" + ax_int.toString() + " 心</dd>" +
                "<dt>金粒</dt><dd>" + jl_int.toString() + " 粒</dd>" +
                "<dt>绿宝石</dt><dd>" + bs_int.toString() + " 颗</dd>" +
                "<dt>钻石</dt><dd>" + zs_int.toString() + " 颗</dd>"
            jq(".pil.cl").eq(i).html(str3);
            i++;
        });
    });
})();