- Timestamp:
- 05/19/07 03:45:55 (18 months ago)
- Files:
-
- 1 modified
-
util/smartlinks.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
util/smartlinks.pl
r16369 r16453 137 137 var id = 'smartlink_' + num; 138 138 var div = document.getElementById(id); 139 div.style.display = (div.style.display == 'none') ? ' block' : 'none';139 div.style.display = (div.style.display == 'none') ? '' : 'none'; 140 140 141 141 var text = this.firstChild; … … 190 190 } 191 191 192 link.replaceChild(document.createTextNode(' -'), link.lastChild); // replace ending ":" with " -" 192 var end = link.lastChild; 193 if ((end.nodeType == 3) && (end.nodeValue.search(/:$/) > -1)) { 194 end.nodeValue = end.nodeValue.replace(/:$/, ' -'); 195 } 193 196 194 197 link.href = '#'; … … 485 488 border: 1px solid; 486 489 padding: 0.2em; 487 display: block;488 490 } 489 491 </style> … … 564 566 if ($test_result) { 565 567 if ($ok_count == 0 && $failed_count == 0) { 566 $stat = " — <code>N/A</code>";568 $stat = " (no results)"; 567 569 } else { 568 $stat = " — <code>$ok_count √, $failed_count ×</code>";570 $stat = " (<code>$ok_count √, $failed_count ×</code>)"; 569 571 } 570 572 } else { 571 $stat = ' <code></code>';573 $stat = ''; 572 574 } 573 575 … … 575 577 576 578 my $html = <<"_EOC_"; 577 <p>From $file lines $from ~$to$stat:<span id="smartlink_skip_${snippet_id}"> <a href="#smartlink_skipto_${snippet_id}">(skip)</a></span></p>579 <p>From $file lines $from–$to$stat:<span id="smartlink_skip_${snippet_id}"> <a href="#smartlink_skipto_${snippet_id}">(skip)</a></span></p> 578 580 <div id="smartlink_${snippet_id}" class="smartlink_snippet"> 579 581 $snippet
