File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,6 @@ import type { AttemptDataWithIDAndRev } from "../results/AttemptData";
33// import {ScrambleID} from "./scramble-worker"
44import { trForAttempt } from "./results-table" ;
55
6- // WebSafari (WebKit) doesn't center text in `<select>`'s `<option>` tags: https://bugs.webkit.org/show_bug.cgi?id=40216
7- // We detect Safari based on https://stackoverflow.com/a/23522755 so we can do an ugly workaround (manually adding padding using spaces) below.
8- const isSafari = / ^ ( (? ! c h r o m e | a n d r o i d ) .) * s a f a r i / i. test ( navigator . userAgent ) ;
9-
106type FormattedStats = {
117 mean3 : string ;
128 avg5 : string ;
@@ -127,13 +123,7 @@ export class StatsView {
127123 ] . map ( ( s ) => s . length ) ,
128124 ) ;
129125 function setStat ( elem : HTMLOptionElement , s : string ) : void {
130- let spacing = "" ;
131- if ( isSafari ) {
132- for ( let i = 0 ; i < ( maxLen - s . length ) * 0.75 ; i ++ ) {
133- spacing += " " ;
134- }
135- }
136- elem . innerHTML = spacing ;
126+ elem . textContent = "" ;
137127 elem . appendChild ( document . createTextNode ( s ) ) ;
138128 }
139129
You can’t perform that action at this time.
0 commit comments