'<tr>',
'<th colspan="3">feature',
(map {
- sprintf('<th colspan="%d" title="%.1f%%">%s',
+ my $name = $caniuse->{agents}->{$_}->{browser};
+ sprintf('<th colspan="%d" title="%s">%s',
scalar @{ $versions{$_} },
- sum(values %{ $canihas->{$_} }),
+ join(' ',
+ sprintf('%.1f%%', sum(values %{ $canihas->{$_} })),
+ $name,
+ ),
do {
- my $name = $caniuse->{agents}->{$_}->{browser};
- length $name < 16 ? $name : $caniuse->{agents}->{$_}->{abbr};
+ length $name < 3 + @{ $versions{$_} }*2 ? $name
+ : $caniuse->{agents}->{$_}->{abbr};
},
)
} @browsers),
sub featurescore {
# relative amount of support for given feature
- state $statspts = { y=>10, 'y x'=>9, a=>5, 'a x'=>5, j=>2, 'p j'=>2, p=>1 };
+ state $statspts = { y=>10, 'y x'=>10, a=>5, 'a x'=>5, j=>2, 'p j'=>2, p=>1 };
my $rank = 0;
if (my $row = shift) {
if ($canihas) {