common: fix initial call to setup debug time
[sheet.git] / browser.plp
index a78e0ecab8f37c178bfa300ecc6b9a58b7473879..de245b8159a8af06e56b140ccfe0dab3d24cbc38 100644 (file)
@@ -90,7 +90,7 @@ print <<'';
 <p id="intro">Alternate rendition of Fyrd's <a href="http://caniuse.com/">when can I use...</a> page
 
 my ($canihas, $usage);
-my $minusage = $get{threshold} // .7;
+my $minusage = $get{threshold} // 1;
 given ($get{usage} // 'wm') {
        when (!$_) {
                # none
@@ -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};
@@ -396,7 +405,7 @@ sub saybrowsercols {
                                map { split / /, $_ }
                                $prev
                        ));
-                       $title .= "\n".EscapeHTML($_) for @notes;
+                       $title .= "\n$_" for notestotitle(@notes);
 
                        printf('<td class="%s" colspan="%d" title="%s">%s',
                                join(' ',