// ==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 // @downloadURL none // ==/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 = "
积分
" + jf_int.toString() + "
" + "
人气
" + rq_int.toString() + " 点
" + "
贡献
" + gx_int.toString() + " 份
" + "
爱心
" + ax_int.toString() + " 心
" + "
金粒
" + jl_int.toString() + " 粒
" + "
绿宝石
" + bs_int.toString() + " 颗
" + "
钻石
" + zs_int.toString() + " 颗
" jq(".pil.cl").eq(i).html(str3); i++; }); }); })();