git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
word edit: delete empty entries if confirmed
[sheet.git]
/
browser.plp
diff --git
a/browser.plp
b/browser.plp
index c890052b866f8e85f7a80f424a8b78755c7bf88a..80369d9773ecc77fb13c9e5aabc6acd420c0bc41 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.",
@@
-36,11
+36,14
@@
my %CSTATS = (
'p d' => 'l2',
'a d' => 'l2',
'y' => 'l5',
'p d' => 'l2',
'a d' => 'l2',
'y' => 'l5',
+ 'y #' => 'l4',
'y x' => 'l5 ex',
'y x' => 'l5 ex',
+ 'y x #' => 'l4 ex',
'a' => 'l3',
'a x' => 'l3 ex',
'p' => 'l2',
'u' => 'l0',
'a' => 'l3',
'a x' => 'l3 ex',
'p' => 'l2',
'u' => 'l0',
+ 'u d' => 'l2',
);
my %DSTATS = (
u => 'unknown',
);
my %DSTATS = (
u => 'unknown',
@@
-83,8
+86,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
+112,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
+249,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]
),
);
}
}
);
}
}
@@
-413,6
+419,7
@@
sub saybrowsercols {
));
$title .= "\n$_" for notestotitle(@notes);
));
$title .= "\n$_" for notestotitle(@notes);
+ $prev .= ' #' if @notes and $prev =~ /^y/;
printf('<td class="%s" colspan="%d" title="%s">%s',
join(' ',
X => $CSTATS{$prev},
printf('<td class="%s" colspan="%d" title="%s">%s',
join(' ',
X => $CSTATS{$prev},
@@
-423,7
+430,7
@@
sub saybrowsercols {
),
scalar @span,
$title,
),
scalar @span,
$title,
- showversions($span[0]->[0], @span > 1 ? $span[-1]->[-1] : ()),
+ showversions($span[0]->[0], @span > 1
&& defined $ver
? $span[-1]->[-1] : ()),
);
undef $prev;
@span = ();
);
undef $prev;
@span = ();
@@
-474,6
+481,7
@@
sub showversions {
<div class="legend">
<table class="glyphs"><tr>
<td class="X l5">supported
<div class="legend">
<table class="glyphs"><tr>
<td class="X l5">supported
+ <td class="X l4">annotated
<td class="X l3">partial
<td class="X l2">optional
<td class="X l1">missing
<td class="X l3">partial
<td class="X l2">optional
<td class="X l1">missing
@@
-511,5
+519,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>