version => 'v1.0',
description =>
"caniuse.",
- keywords => [qw'html css browser feature'],
+ keywords => [qw'
+ web browser support compatibility usage available feature
+ html html5 css css3 svg javascript js dom mobile
+ ie internet explorer firefox chrome safari webkit opera
+ '],
stylesheet => [qw'circus dark mono red light'],
data => ['browser-support.inc.pl'],
});
:>
<h1>Browser compatibility</h1>
-<p id="intro">Alternate view of Fyrd's <a href="http://caniuse.com/">when can I use...</a> page<:
+<p id="intro">Alternate rendition of Fyrd's <a href="http://caniuse.com/">when can I use...</a> page<:
my ($canihas, $usage);
given ($get{usage} // 'wm') {
when (!$_) {
my $scorediv = (max(map { ref $_ eq 'HASH' && sum(values %$_) } values %$canihas) // 1) / 100;
print '<table class="mapped">';
-print '<col>' x 3;
+print '<col span="3">'; # should match first thead row
printf '<colgroup span="%d">', scalar @{ $versions{$_} } for @browsers;
-print "\n";
+say '</colgroup><col>';
my $header = join('',
'<tr>',
sprintf('<th colspan="%d" class="%s" title="%s">%s',
scalar @{ $versions{$_} },
join(' ', map {"b-a-$_"} grep {$_}
- $_, $caniuse->{agents}->{$_}->{prefix},
+ $_, @{ $caniuse->{agents}->{$_} }{'prefix', 'type'},
),
join(' ',
sprintf('%.1f%%', sum(values %{ $canihas->{$_} })),
for ($row->{categories}) {
my $cell = $_ ? lc $_->[0] : '-';
+ $cell =~ s/ api$//; # trim unessential fluff in 'js api'
printf '<th title="%s">%s', join(' + ', @$_), $cell;
}