git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unicode: classify private use characters as unassigned
[sheet.git]
/
browser.plp
diff --git
a/browser.plp
b/browser.plp
index 0fc1627cec5eb3265ca13ac16eb34b7d3ed6bc46..a78e0ecab8f37c178bfa300ecc6b9a58b7473879 100644
(file)
--- a/
browser.plp
+++ b/
browser.plp
@@
-1,6
+1,4
@@
<(common.inc.plp)><:
<(common.inc.plp)><:
-use 5.010;
-use utf8;
use List::Util qw(sum max first);
no if $] >= 5.018, warnings => 'experimental::smartmatch';
use List::Util qw(sum max first);
no if $] >= 5.018, warnings => 'experimental::smartmatch';
@@
-98,16
+96,18
@@
given ($get{usage} // 'wm') {
# none
}
when (!m{ \A [a-z]\w+ (?:/\d[\d-]*\d)? \z }x) {
# none
}
when (!m{ \A [a-z]\w+ (?:/\d[\d-]*\d)? \z }x) {
- printf "<p>Invalid browser usage data request: <em>%s</em>",
- 'identifier must be alphanumeric name or <q>0</q>';
+ Alert([
+ 'Invalid browser usage data request',
+ 'Identifier must be alphanumeric name or <q>0</q>.',
+ ]);
}
$canihas = do "data/browser/usage-$_.inc.pl" or do {
}
$canihas = do "data/browser/usage-$_.inc.pl" or do {
-
printf "<p>Browser usage data not found: <em>%s</em>", $@ || $!
;
+
Alert('Browser usage data not found', $@ || $!)
;
break;
};
$usage = $_;
my $ref = $canihas->{-title} || 'unknown';
break;
};
$usage = $_;
my $ref = $canihas->{-title} || 'unknown';
- $ref = s
printf '<a href="%s">%s</a>', $_, $ref
+ $ref = s
howlink($ref, $_)
for $canihas->{-site} || $canihas->{-source} || ();
$ref .= " $_" for $canihas->{-date} || ();
print "\nwith $ref browser usage statistics";
for $canihas->{-site} || $canihas->{-source} || ();
$ref .= " $_" for $canihas->{-date} || ();
print "\nwith $ref browser usage statistics";
@@
-339,10
+339,10
@@
sub saytitlecol {
say '</p>';
}
printf 'Resources: %s.', join(', ', map {
say '</p>';
}
printf 'Resources: %s.', join(', ', map {
- s
printf '<a href="%s">%s</a>', EscapeHTML($_->{url}), EscapeHTML($_->{title
})
+ s
howlink($_->{title}, $_->{url
})
} @$_) for grep { @$_ } $row->{links} // ();
printf '<br>Parent feature: %s.', join(', ', map {
} @$_) for grep { @$_ } $row->{links} // ();
printf '<br>Parent feature: %s.', join(', ', map {
- s
printf '<a href="%s">%s</a>', EscapeHTML("#$_"), $caniuse->{data}->{$_}->{title}
+ s
howlink($caniuse->{data}->{$_}->{title}, "#$_")
} $_) for $row->{parent} || ();
print '</div>';
}
} $_) for $row->{parent} || ();
print '</div>';
}
@@
-353,7
+353,7
@@
sub saystatuscol {
for ($row->{status}) {
my $cell = $_ // '-';
for ($row->{status}) {
my $cell = $_ // '-';
- $cell = s
printf '<a href="%s">%s</a>', $_, $cell
for $row->{spec} // ();
+ $cell = s
howlink($cell, $_)
for $row->{spec} // ();
printf '<td title="%s" class="l %s">%s',
$caniuse->{statuses}->{$_}, $CSTATUS{$_} // '', $cell;
}
printf '<td title="%s" class="l %s">%s',
$caniuse->{statuses}->{$_}, $CSTATUS{$_} // '', $cell;
}