other => 'l0', # non-w3
);
my %versions;
-if (my ($somerow) = values %{ $caniuse->{data} }) {
- while (my ($browser, $row) = each %{ $somerow->{stats} }) {
- $versions{$browser} = [ sort { paddedver($a) cmp paddedver($b) } keys %$row ];
- }
+while (my ($browser, $row) = each %{ $caniuse->{agents} }) {
+ $versions{$browser} = [
+ sort { paddedver($a) cmp paddedver($b) } grep { defined }
+ @{ $row->{versions} }
+ ];
}
print <<'';
<p id="intro">Alternate rendition of Fyrd's <a href="http://caniuse.com/">when can I use...</a> page
my ($canihas, $usage);
-my $minusage = $get{threshold} // .7;
+my $minusage = $get{threshold} // 1;
given ($get{usage} // 'wm') {
when (!$_) {
# none
return @html;
}
+sub notestotitle {
+ my @notes = @_;
+ for (@notes) {
+ EscapeHTML($_);
+ s{ \[ ([^]]*) \] \( [^)]* \) }{$1}gx; # strip link urls
+ }
+ return @notes;
+}
+
sub saytitlecol {
my ($id) = @_;
my $row = $caniuse->{data}->{$id};
map { split / /, $_ }
$prev
));
- $title .= "\n".EscapeHTML($_) for @notes;
+ $title .= "\n$_" for notestotitle(@notes);
printf('<td class="%s" colspan="%d" title="%s">%s',
join(' ',