您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hover recent threads to see author. I don't guarantee this works on anything other than Chrome and the current page structure of mmo-champion.
// ==UserScript== // @name mmo-champion.com author sneak-peak // @namespace // @version 0.1 // @description Hover recent threads to see author. I don't guarantee this works on anything other than Chrome and the current page structure of mmo-champion. // @match http://www.mmo-champion.com/content/* // @copyright 2016+, manhands // ==/UserScript== var recentForumPostsIterator=document.evaluate("//h4[@class='cms_widget_post_header']/a[contains(@href, 'threads')]",document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null); for (var i=0; i < recentForumPostsIterator.snapshotLength; i++) { var thisA = recentForumPostsIterator.snapshotItem(i); getAuthor(thisA); } function getAuthor(thisA) { var onSuccess = function(response, thisA) { var re = /a class=".*?username.*?<strong>.*?<\/strong>/g; var authorSegment = re.exec(response); re = />[^<>]*?<\//g; authorSegment = String(re.exec(authorSegment)); var subStart = 1; var subStop = authorSegment.length-2; authorSegment = authorSegment.substring(subStart,subStop); thisA.title = authorSegment + ": " + thisA.title; }; return grabAuthor(thisA, onSuccess); } function grabAuthor(thisA, onSuccess) { var xmlhttp = new XMLHttpRequest(); var link = thisA.href.substring(0, thisA.href.indexOf('?')); xmlhttp.open("GET",link,true); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) onSuccess(xmlhttp.response, thisA); }; xmlhttp.send(); }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址