);
my %CSTATUS = (
unoff => 'l1', # unofficial
- wd => 'l3', # draft
- cr => 'l4', # candidate
- pr => 'l4', # proposed
+ wd => 'l2', # draft
+ cr => 'l3', # candidate
+ pr => 'l3', # proposed
rec => 'l5', # recommendation
- other => 'l2', # non-w3
- ietf => 'l5', # standard
+ ls => 'l4', # whatwg
+ ietf => 'l0', # standard
+ other => 'l0', # non-w3
);
my %versions;
if (my ($somerow) = values %{ $caniuse->{data} }) {
}
print '<td>' x 1;
say '</thead>';
-say '<tfoot>', $header, '</tfoot>';
+say '<tfoot>', $header;
+{
+ # prefix indicates browser family; count adjacent families
+ my (@families, %familycount);
+ for my $browser (@browsers) {
+ my $family = $caniuse->{agents}->{$browser}->{prefix};
+ push @families, $family unless $familycount{$family};
+ $familycount{$family} += @{ $versions{$browser} };
+ }
+
+ print "\n", '<tr class="cat">';
+ print '<td>' x 3;
+ printf '<th colspan="%d">%s', $familycount{$_}, $_ for @families;
+ print '<td>';
+}
+say '</tfoot>';
sub featurescore {
# relative amount of support for given feature