browser: browser and versions in cell titles
[sheet.git] / browser.plp
index 44c2b221736f4e70dc7100911dd5ad04ea63c28c..effda377a2f9bbf1e5ce3564c2010238ac2c2923 100644 (file)
@@ -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);