您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
回复大于150,浏览大于5000的帖子自动背景加红,字体加粗效果
// ==UserScript== // @name 虎扑(hupu.com)热帖高亮 // @namespace [email protected] // @version 0.1 // @grant none // @include http://bbs.hupu.com/* // @description 回复大于150,浏览大于5000的帖子自动背景加红,字体加粗效果 // ==/UserScript== var allpres, thispre; allpres = document.evaluate( "//table[@id='ajaxtable']//td[@class='smalltxt']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); if (allpres.snapshotLength == 0) { allpres = document.evaluate( "//table[@id='pl']//td[@class='p_re']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); } var reg_pre = new RegExp(/([0-9]{4,}|1{1}[5-9]{1}[0-9]{1,}|[2-9]{1}[0-9]{2,})(\s\/\s)([0-9]{5,}|[5-9]{1}[0-9]{3,})/); for (var i = 0; i < allpres.snapshotLength; i++) { thispre = allpres.snapshotItem(i); // 使用 thispre var html = thispre.innerHTML; if(reg_pre.test(html)){ thispre.parentNode.style.backgroundColor = '#FFA07A'; thispre.parentNode.style.fontWeight = "bold"; } }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址