X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/70b958bcdf1c8fa7105090135818d7219cec8fa0..560ad76852eb76efaa7ad860dc03bd9980667345:/browser.plp diff --git a/browser.plp b/browser.plp index 0d4d4e7..de245b8 100644 --- a/browser.plp +++ b/browser.plp @@ -90,7 +90,7 @@ print <<'';
Alternate rendition of Fyrd's when can I use... page my ($canihas, $usage); -my $minusage = $get{threshold} // .7; +my $minusage = $get{threshold} // 1; given ($get{usage} // 'wm') { when (!$_) { # none @@ -107,7 +107,7 @@ given ($get{usage} // 'wm') { }; $usage = $_; my $ref = $canihas->{-title} || 'unknown'; - $ref = sprintf '%s', $_, $ref + $ref = showlink($ref, $_) for $canihas->{-site} || $canihas->{-source} || (); $ref .= " $_" for $canihas->{-date} || (); print "\nwith $ref browser usage statistics"; @@ -311,6 +311,15 @@ sub formatnotes { return @html; } +sub notestotitle { + my @notes = @_; + for (@notes) { + EscapeHTML($_); + s{ \[ ([^]]*) \] \( [^)]* \) }{$1}gx; # strip link urls + } + return @notes; +} + sub saytitlecol { my ($id) = @_; my $row = $caniuse->{data}->{$id}; @@ -339,10 +348,10 @@ sub saytitlecol { say '
'; } printf 'Resources: %s.', join(', ', map { - sprintf '%s', EscapeHTML($_->{url}), EscapeHTML($_->{title}) + showlink($_->{title}, $_->{url}) } @$_) for grep { @$_ } $row->{links} // (); printf '