X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/f2c485e21f1945fdd5ddbc1ffff3433624744d32..52115de0b42272dd62f54f234590ae5b4d086565:/browser.plp diff --git a/browser.plp b/browser.plp index 7e52a03..151daeb 100644 --- a/browser.plp +++ b/browser.plp @@ -57,7 +57,7 @@ my %CSTATUS = ( rec => 'di-a', # recommendation ietf => 'di-aa', # standard ); -my @browsers = qw(trident gecko webkit_saf presto); +my @browsers = qw(trident gecko webkit_saf webkit_chr presto); my %versions; if (my ($somerow) = values %{ $caniuse->{data} }) { while (my ($browser, $row) = each %{ $somerow->{stats} }) { @@ -65,19 +65,19 @@ if (my ($somerow) = values %{ $caniuse->{data} }) { } } -print ''; -print '' x 2; +print '
'; +print '' x 3; printf '', scalar @{ $versions{$_} } for @browsers; print "\n"; print ''; -print "'; -print '\n"; sub featurescore { @@ -110,8 +110,17 @@ for my $id (sort { my $row = $caniuse->{data}->{$id}; my $data = $row->{stats} or next; # skip metadata [summary] printf '', $id; - printf '
$_" for qw(feature status); +print 'feature'; printf '%s', scalar @{ $versions{$_} }, $caniuse->{agents}->{$_}->{browser} for @browsers; # preceding row without any colspan to work around gecko bug print '
' x $_ for 2, map { scalar @{ $versions{$_} } } @browsers; +print '' x $_ for 3, (map { scalar @{ $versions{$_} } } @browsers), 1; print "
%s', $row->{description}, $row->{title}; - printf '%s', $caniuse->{statuses}->{$_}, $CSTATUS{$_} // '', $_ for $row->{status}; + for ($row->{categories}) { + my $cell = $_ ? lc $_->[0] : '-'; + print '', $cell; + } + printf '%s', $row->{description}, $row->{title}; + for ($row->{status}) { + my $cell = $_ // '-'; + $cell = sprintf '%s', $_, $cell for $row->{spec} // (); + printf '%s', + $caniuse->{statuses}->{$_}, $CSTATUS{$_} // '', $cell; + } for my $browser (@browsers) { my ($prev, @span); for my $ver (@{ $versions{$browser} }, undef) {