git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
browser: upstream dates on hover; update name
[sheet.git]
/
browser.plp
diff --git
a/browser.plp
b/browser.plp
index 421d9eff7aaa0d1a930c173b2cac2628282970d2..dcc76883c492ab3b8babeb9dd881bd6aed699883 100644
(file)
--- a/
browser.plp
+++ b/
browser.plp
@@
-4,7
+4,7
@@
no if $] >= 5.018, warnings => 'experimental::smartmatch';
Html({
title => 'browser compatibility cheat sheet',
Html({
title => 'browser compatibility cheat sheet',
- version => '1.
4
',
+ version => '1.
5
',
description => [
"Compatibility table of new web features (HTML5, CSS3, SVG, Javascript)",
"comparing support and usage share for all popular browser versions.",
description => [
"Compatibility table of new web features (HTML5, CSS3, SVG, Javascript)",
"comparing support and usage share for all popular browser versions.",
@@
-83,8
+83,11
@@
while (my ($browser, $row) = each %{ $caniuse->{agents} }) {
];
}
];
}
-print <<'';
-<p id="intro">Alternate rendition of Fyrd's <a href="http://caniuse.com/">when can I use...</a> page
+my $ref = showlink('Can I use', 'https://caniuse.com/');
+$ref =~ s/(?=>)/ title="updated $_"/
+ for map { s/[\sT].*//r } $caniuse->{-date} || ();
+$ref = "Fyrd's $ref page";
+say '<p id="intro">Alternate rendition of '.$ref;
my ($canihas, $usage);
my $minusage = $get{threshold} // 1;
my ($canihas, $usage);
my $minusage = $get{threshold} // 1;
@@
-106,7
+109,7
@@
given ($get{usage} // 'wm') {
my $ref = $canihas->{-title} || 'unknown';
$ref = showlink($ref, $_)
for $canihas->{-site} || $canihas->{-source} || ();
my $ref = $canihas->{-title} || 'unknown';
$ref = showlink($ref, $_)
for $canihas->{-site} || $canihas->{-source} || ();
- $ref
.= " $_"
for $canihas->{-date} || ();
+ $ref
=~ s/(?=>)/ title="updated $_"/
for $canihas->{-date} || ();
print "\nwith $ref browser usage statistics";
}
print "\nwith $ref browser usage statistics";
}
@@
-243,7
+246,7
@@
for my $browser (@browsers) {
$span->[-1] eq $lastver ? () : '(development)',
),
!defined $lastver && ' class="ex"',
$span->[-1] eq $lastver ? () : '(development)',
),
!defined $lastver && ' class="ex"',
- showversions($lastver),
+ showversions($lastver
// $span->[0]
),
);
}
}
);
}
}
@@
-455,9
+458,9
@@
say '</table>';
sub paddedver {
# normalised version number comparable as string (cmp)
sub paddedver {
# normalised version number comparable as string (cmp)
-
shift =~
/(?:.*-|^)(\d*)(.*)/;
+
$_[0] =~ m
/(?:.*-|^)(\d*)(.*)/;
# matched (major)(.minor) of last value in range (a-B)
# matched (major)(.minor) of last value in range (a-B)
- return sprintf('%02d',
$1 ||
99) . $2;
+ return sprintf('%02d',
length $1 ? $1 :
99) . $2;
}
sub showversions {
}
sub showversions {
@@
-511,5
+514,7
@@
sub showversions {
</div>
<script type="text/javascript" src="/searchlocal.js"></script>
</div>
<script type="text/javascript" src="/searchlocal.js"></script>
-<script type="text/javascript"> prependsearch(document.getElementById('intro')) </script>
+<script type="text/javascript"><!--
+ prependsearch(document.getElementById('intro'));
+//--></script>