1
var list = document.querySelectorAll("tbody td");
2
3var stars = [];
4var stars_row = [];
5var stars_last = [0,0,0,0,0,0];
6var sum = 0;
7for (var i = 0; i < list.length; i+ ) {
8
9if (i%6 == 0) {
10if (stars_row.length == 0 ) { continue; }
11stars_row.push(sum);
12stars.push(stars_row);
13var stars_row = [];
14var sum = 0;
15
16continue;
17};
18
19var count = (list[i].textContent.match(/★/g) || []).length;
20sum = count;
21stars_row.push(count);
22
23stars_last[i%6] = stars_last[i%6] count;
24}
25stars_row.push(sum);
26stars.push(stars_row);
27stars_last.shift();
28stars.push(stars_last);
29console.table(stars);
30