Skip to content

Commit e20ca39

Browse files
committed
Auto formatting
1 parent 9cc55f6 commit e20ca39

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

media/commitfest/js/change_tag.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ for (let i = 0; i < inputs.length; i++) {
1111
}
1212

1313
// Break the #rrggbb color code into RGB components.
14-
color = parseInt(element.value.substr(1), 16);
14+
color = Number.parseInt(element.value.substr(1), 16);
1515
red = ((color & 0xff0000) >> 16) / 255;
1616
green = ((color & 0x00ff00) >> 8) / 255;
1717
blue = (color & 0x0000ff) / 255;
@@ -34,11 +34,7 @@ for (let i = 0; i < inputs.length; i++) {
3434
// Complain if we're below WCAG 2.2 recommendations.
3535
if (contrast < 4.5) {
3636
element.setCustomValidity(
37-
"Consider choosing a darker color. " +
38-
"(Tag text is small and white.)\n\n" +
39-
"Contrast ratio: " +
40-
Math.trunc(contrast * 10) / 10 +
41-
" (< 4.5)",
37+
`Consider choosing a darker color. (Tag text is small and white.)\n\nContrast ratio: ${Math.trunc(contrast * 10) / 10} (< 4.5)`,
4238
);
4339

4440
// The admin form uses novalidate, so manually display the browser's

0 commit comments

Comments
 (0)