browser: display 'js api' category as 'js'
[sheet.git] / browser.plp
index ef260e118401dd5b81649c397d4b7646801348fe..258999e834364ce4cf4b4a07278fa1ff07d38783 100644 (file)
@@ -116,8 +116,11 @@ my $header = join('',
        '<th colspan="3">feature',
        (map {
                my $name = $caniuse->{agents}->{$_}->{browser};
-               sprintf('<th colspan="%d" title="%s">%s',
+               sprintf('<th colspan="%d" class="%s" title="%s">%s',
                        scalar @{ $versions{$_} },
+                       join(' ', map {"b-a-$_"} grep {$_}
+                               $_, $caniuse->{agents}->{$_}->{prefix},
+                       ),
                        join(' ',
                                sprintf('%.1f%%', sum(values %{ $canihas->{$_} })),
                                $name,
@@ -189,6 +192,7 @@ sub saytitlecol {
 
        for ($row->{categories}) {
                my $cell = $_ ? lc $_->[0] : '-';
+               $cell =~ s/ api$//;  # trim unessential fluff in 'js api'
                printf '<th title="%s">%s', join(' + ', @$_), $cell;
        }