X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/068f457f9a60a17ca141d3b90bd7dee9aa7267bc..bd77795ed44d7b642c66b05e0982bff026fdc68f:/browser.plp?ds=sidebyside diff --git a/browser.plp b/browser.plp index 16aad08..ea23d0a 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,7 +9,7 @@ Html({ description => "caniuse.", keywords => [qw'html css browser feature'], - stylesheet => [qw'light dark circus mono red'], + stylesheet => [qw'circus dark mono red light'], data => ['browser-support.inc.pl'], }); @@ -19,26 +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; @@ -59,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 |