X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/69a605876ce089075ae4fe8ca76c85630a8c6897..7c8362694ebd579891ee698bd069ba2ce702b89a:/browser.plp diff --git a/browser.plp b/browser.plp index 330b443..ce56bdb 100644 --- a/browser.plp +++ b/browser.plp @@ -1,5 +1,6 @@ <(common.inc.plp)><: use 5.010; +use utf8; use List::Util qw(sum max); Html({ @@ -8,8 +9,8 @@ Html({ description => "caniuse.", keywords => [qw'html css browser feature'], - stylesheet => [qw'light dark circus mono red'], - data => ['caniuse.js'], + stylesheet => [qw'circus dark mono red light'], + data => ['browser-support.inc.pl'], }); :> @@ -19,48 +20,28 @@ Html({ with Wikimedia browser usage statistics.
+Browser usage data not found: %s.
\n", $_ for $! || $@; + +{ + map { + $_ => +{ + map { + ($_->[4] => 0 ), # future + ($_->[3] => .5), # next + ($_->[0] => 5 ), # past + ($_->[1] => 10 ), # previous + ($_->[2] => 30 ), # current + } $caniuse->{agents}->{$_}->{versions} + } + } @browsers + }; # fallback hash based on release semantics }; my $scorediv = (max(map { sum(values %$_) } values %$canihas) // 1) / 100; @@ -81,16 +75,22 @@ print '$_
" for map { ref $_ ? @$_ : $_ || () } + $row->{description}, $row->{notes}; + printf 'Resources: %s.', join(', ', + map { qq($_->{title}) } @$_ + ) for grep { @$_ } $row->{links} // (); + print 'supported - | prefixed - | partial - | external (js/plugin) - | missing + | supported + | prefixed + | partial + | external (js/plugin) + | missing + | unknown |