//"document" requires the url which ends with ".dat" extension in the domain of "open2ch.net"
//Use this code only under JavaScript Console!!(i recommend Google Chrome because i only use it with test)
var d = document.getElementsByTagName("pre")[0].textContent;
var ds = d.split("\n");
var koteAll = ds.map(function(elm){ return elm.split("<>")[0]} )
.filter(function(elm){ return (/.+◆/).test(elm)} )
.map(function(elm){ return elm.replace(/<.?b>/g,"").replace(">",">","g").replace(/忍法帖【.*】/g,"")} )
.sort();
var koteUniq = koteAll.filter(function (x, i, self) { return self.indexOf(x) === i;});
var res = koteUniq.map(
function(elmU){
return (koteAll.filter(function(elmA){
return elmA == elmU;}));
}
);
var sorted = res.sort(function(a,b){
return b.length - a.length ;
});
var output_names = sorted.map(function(elm){return elm[0]});
var output_values = sorted.map(function(elm){return elm.length});
var output = [];//output[0]←コテハンの名前, output[1]←各コテハンのレス数
output.push(output_names);
output.push(output_values);
//結果書き込み
for(var i = 0; i < output[0].length; i++){
document.write(output[0][i] + "," + output[1][i] + "<br>");
}