Skip to content

Commit 0c4448f

Browse files
committed
rm colors from company screen
1 parent 9e0e458 commit 0c4448f

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

src/problems-by-company/company.html

+1-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@
1212
<select id="companySelect"></select>
1313
<h1 id="title">Amazon</h1>
1414
<p>
15-
<span id="score">Score</span> = How likely the company is to ask this question in an interview on a scale of
16-
1-100
17-
</p>
18-
<p>
19-
Data collected from 2021-2023
15+
<span id="score">Score</span> = The number of times the question was asked between 2021-2023
2016
</p>
2117
<table id="solutionTable">
2218
<tr>

src/problems-by-company/company.ts

+2-18
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,10 @@ function addCompanyProblems(sortMethod: string) {
113113
const scoreCell = row.insertCell(2);
114114
scoreCell.innerText = solution.score.toString();
115115
const score = solution.score;
116-
const color = getColorForScore(score);
116+
const color = 'white';
117117
scoreCell.style.color = color;
118118
scoreCell.style.fontWeight = 'bold';
119119
});
120-
121-
function getColorForScore(score: number) {
122-
const percent = score / 100;
123-
const red = Math.floor(255 * (1 - percent));
124-
const green = Math.floor(255 * percent);
125-
const blue = 0;
126-
return `rgb(${red}, ${green}, ${blue})`;
127-
}
128120
});
129121
}
130122

@@ -200,18 +192,10 @@ function sortBy(column: string) {
200192
const scoreCell = row.insertCell(2);
201193
scoreCell.innerText = solution.score.toString();
202194
const score = solution.score;
203-
const color = getColorForScore(score);
195+
const color = 'white';
204196
scoreCell.style.color = color;
205197
scoreCell.style.fontWeight = 'bold';
206198
});
207-
208-
function getColorForScore(score: number) {
209-
const percent = score / 100;
210-
const red = Math.floor(255 * (1 - percent));
211-
const green = Math.floor(255 * percent);
212-
const blue = 0;
213-
return `rgb(${red}, ${green}, ${blue})`;
214-
}
215199
}
216200

217201
/* Run the script */

0 commit comments

Comments
 (0)