X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/0c4ca53d0803c3d9db0a06b57f650e65c3327467..ac5213bf8d4067b6f3a02e3cdcb90ce729c1e64d:/browser.plp diff --git a/browser.plp b/browser.plp index e4e0b28..1f5cfc0 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"; +} +:>.
supported - | prefixed | partial | external (js/plugin) | missing | unknown + | prefixed |
<: if ($usage) { :> Usage percentage: 0 - .01 - @@ -251,12 +269,21 @@ sub showversions { 10 - 20 - majority -
previous version | +current | +upcoming (within months) | +future (within a year) | +