browser: explain unreleased version status in title
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 9 Dec 2010 00:51:35 +0000 (01:51 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 15 Dec 2010 21:40:44 +0000 (22:40 +0100)
browser.plp

index 02e7e0b7a2481d72d08333392883e5e7481177c6..b2a7867fd7a402b64bfd45971c3abf88bbd526a8 100644 (file)
@@ -164,16 +164,19 @@ print '<thead>', $header;
 print "\n<tr>";
 print '<td>' x 3;
 for my $browser (@browsers) {
-       printf('<td title="%s"%s>%s',
-               join(' ',
-                       sprintf('%.1f%%', $canihas->{$browser}->{$_} * $usagepct),
-                       "version $_",
-               ),
-               (map {
-                       defined $_ && !$_ && ' class="ex"'
-               } $caniuse->{agents}->{$browser}->{verrelease}->{$_}),
-               showversions($_),
-       ) for @{ $versions{$browser} };
+       for my $_ (@{ $versions{$browser} }) {
+               my $release = $caniuse->{agents}->{$browser}->{verrelease}->{$_};
+               my $future = defined $release;
+               printf('<td title="%s"%s>%s',
+                       join(' ',
+                               sprintf('%.1f%%', $canihas->{$browser}->{$_} * $usagepct),
+                               $future ? 'development' : (),
+                               "version $_",
+                       ),
+                       $future && ' class="ex"',
+                       showversions($_),
+               );
+       }
 }
 print '<td>' x 1;
 say '</thead>';