Skip to content

Commit ac3b3e7

Browse files
committed
fix playerStats
1 parent 664cc89 commit ac3b3e7

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

lib/patches/playerStats.js

-35
Original file line numberDiff line numberDiff line change
@@ -53,33 +53,6 @@ function apply(stats, item, player) {
5353
}
5454
}
5555

56-
for (const line of stats.querySelectorAll('.Player-Info-Line')) {
57-
const header = line.querySelector('.Player-Info-Line-Header').textContent;
58-
59-
const addRating = rating => {
60-
const stars = rating * 5;
61-
const rawStars = document.createElement('div');
62-
rawStars.textContent = stars.toFixed(2);
63-
rawStars.title = stars.toString();
64-
line.append(rawStars);
65-
};
66-
67-
switch (header) {
68-
case 'Batting':
69-
addRating(player.hittingRating);
70-
break;
71-
case 'Pitching':
72-
addRating(player.pitchingRating);
73-
break;
74-
case 'Baserunning':
75-
addRating(player.baserunningRating);
76-
break;
77-
case 'Defense':
78-
addRating(player.defenseRating);
79-
break;
80-
}
81-
}
82-
8356
function addButton(text, func) {
8457
let buttonLine = document.createElement('div');
8558
buttonLine.classList.add('Player-Info-Line');
@@ -194,13 +167,8 @@ function apply(stats, item, player) {
194167
}
195168

196169
let tabContent = stats.closest('.tab-content');
197-
let items = content.querySelector('.Player-Info-Items');
198-
let bio = content.querySelector('.Player-Info-Bio');
199170
let fkSubheader = content.querySelector('.Player-Info-FK-Subheader');
200171

201-
content.removeChild(items);
202-
content.removeChild(bio);
203-
204172
if (fk) {
205173
content.removeChild(fkSubheader);
206174
content.removeChild(fk);
@@ -214,9 +182,6 @@ function apply(stats, item, player) {
214182
stats.append(line);
215183
}
216184

217-
content.append(items);
218-
content.append(bio);
219-
220185
if (fk) {
221186
content.append(fkSubheader);
222187
content.append(fk);

0 commit comments

Comments
 (0)