From 8733f2c8d3a9544baf347ecd42188779794aad92 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 27 Apr 2017 20:48:52 +0200 Subject: [PATCH] browser: browser and versions in cell titles Increases size by 5kB to 134kB (50kB to 793kB uncompressed) but greatly improves usability. --- browser.plp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/browser.plp b/browser.plp index 44c2b22..effda37 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} // (), @@ -397,11 +397,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, $span[0]->[0]) : $_ } + map { $DSTATS{$_} // () } + map { split / /, $_ } + $prev + ), + 'in', $caniuse->{agents}->{$browser}->{abbr}, + showversions((map { @{$_} } @span), undef), )); $title .= "\n$_" for notestotitle(@notes); -- 2.30.0