X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/c2c689e77c561226e525b7e4a76f188878d68c5a..da2ff19ce5ba6f5950f155440e7a3386913a216b:/browser.plp diff --git a/browser.plp b/browser.plp index 44c2b22..c609a57 100644 --- a/browser.plp +++ b/browser.plp @@ -48,10 +48,10 @@ my %DSTATS = ( p => 'plugin required', a => 'partial', y => 'supported', - d => 'disabled by default', + d => '(disabled by default)', x => sub { join(' ', - 'requires prefix', + 'with prefix', map {"-$_-"} ($caniuse->{agents}->{$_[0]}->{prefix_exceptions} // {})->{$_[1]} // $caniuse->{agents}->{$_[0]}->{prefix} // (), @@ -389,7 +389,8 @@ sub saybrowsercols { || 'u' # unsure ); unless (!defined $prev or $prev ~~ $compare) { - my $usage = sum(@{ $canihas->{$browser} }{ map { @{$_} } @span }); + my @vercover = (map { @{$_} } @span); + my $usage = sum(@{ $canihas->{$browser} }{@vercover}); # strip #\d note references from support class my @notes; @@ -397,11 +398,14 @@ sub saybrowsercols { while $prev =~ s/\h \# (\d+) \b//x; # prepare version hover details - my $title = sprintf('%.1f%% %s', $usage * $usagepct, join(', ', - map { ref $_ eq 'CODE' ? $_->($browser, $span[0]->[0]) : $_ } - map { $DSTATS{$_} // () } - map { split / /, $_ } - $prev + my $title = sprintf('%.1f%% %s', $usage * $usagepct, join(' ', + (map { ref $_ eq 'CODE' ? $_->($browser, $vercover[0]) : $_ } + map { $DSTATS{$_} // () } + map { split / /, $_ } + $prev + ), + 'in', $caniuse->{agents}->{$browser}->{abbr}, + showversions(@vercover, undef), )); $title .= "\n$_" for notestotitle(@notes);