// ==UserScript==
// @name 小调网
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://www.xiaopian.com/html/gndy/china/*
// @grant none
// ==/UserScript== (function() {
'use strict'; // Your code here... var x = document.getElementsByClassName('tbspan'); var myhreftext = document.getElementsByClassName('x');
var myhreflink = myhreftext[1].getElementsByTagName('a');
var myreg = new RegExp("\u8C46\u74E3\u8BC4\u5206\\s\\d{1,}\\S{1,}");
var y = new Array();
var temparr = new Array();
var templink;
var fname,fscore,str; for (var i=0;i<x.length;i++)
{
y[i]=x[i].getElementsByTagName('tr')[3].getElementsByTagName('td')[0].textContent;
} for (var i=0;i<y.length;i++)
{
temparr = y[i].split('◎');
fname = temparr[1]+temparr[2]; for (str in temparr)
{
if (myreg.test(temparr[str])==true)
{
fscore = myreg.exec(temparr[str]);
}
}
document.write(i+1+" "+fname+" -> "+"<font size=\"5\" face=\"verdana\" color=red>"+fscore+"</font><br /><br /><hr width=100% size=2 color=#228B22></hr>"); fscore="没有评分!";
} for (var i=0;i<myhreflink.length;i++)
{
if (myhreflink[i].text=="下一页")
{
templink = myhreflink[i].href;
}
}
document.write("<a href="+templink+"><font size=\"5\">下一页</a></font>"); })();