X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/0c4ca53d0803c3d9db0a06b57f650e65c3327467..e1555594fb6091ea9bb05340c7e8576e930bb3c7:/browser.plp?ds=sidebyside diff --git a/browser.plp b/browser.plp index e4e0b28..c2a5d25 100644 --- a/browser.plp +++ b/browser.plp @@ -16,33 +16,47 @@ Html({ :>
Alternate view of Fyrd's when can I use... page -<: -my $canihas = do 'browser-usage.inc.pl' - or printf "
Browser usage data not found: %s.
\n", $! || $@; - -print "with $_ browser usage statistics." for map { - my $ref = $_->{-source} || 'unknown'; - $ref = sprintf '%s', $_, $ref for $_->{-url} || (); - $ref .= " $_" for $_->{-date} || (); - $ref -} $canihas || (); -:> +Alternate view of Fyrd's when can I use... page<: +my ($canihas, $usage); +given ($get{usage} // 'wm') { + when (!$_) { + # none + } + when (!/^\w+$/) { + printf "
Invalid browser usage data request: %s",
+ 'identifier must be alphanumeric name or 0
';
+ }
+ $canihas = do "browser-usage-$_.inc.pl" or do {
+ printf "
Browser usage data not found: %s", $! || $@; + break; + }; + $usage = $_; + my $ref = $canihas->{-source} || 'unknown'; + $ref = sprintf '%s', $_, $ref for $canihas->{-url} || (); + $ref .= " $_" for $canihas->{-date} || (); + print "\nwith $ref browser usage statistics"; +} +:>.
$_
" for map { ref $_ ? @$_ : $_ || () } - $row->{description}, $row->{notes}; - printf 'Resources: %s.', join(', ', - map { qq($_->{title}) } @$_ - ) for grep { @$_ } $row->{links} // (); + Entity($row->{description}), formathtml($row->{notes}); # sic + printf 'Resources: %s.', join(', ', map { + sprintf '%s', EscapeHTML($_->{url}), $_->{title} + } @$_) for grep { @$_ } $row->{links} // (); print 'supported - | prefixed | partial | external (js/plugin) | missing | unknown + | prefixed |
<: if ($usage) { :> Usage percentage: 0 - .01 - @@ -251,13 +304,25 @@ sub showversions { 10 - 20 - majority -
previous version | +current | +upcoming (within months) | +future (within a year) | +