mirror of
https://github.com/git/git.git
synced 2026-02-07 08:15:23 +00:00
Only switch on the line number toggle when highlighting is activated
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Karsten Blees
parent
26109b246d
commit
2d8053b226
@@ -4543,7 +4543,8 @@ sub git_print_page_path {
|
||||
print $cgi->a({-href => href(action=>"blob_plain", file_name=>$file_name,
|
||||
hash_base=>$hb),
|
||||
-title => $name}, esc_path($basename));
|
||||
print '
|
||||
if (gitweb_check_feature('highlight')) {
|
||||
print '
|
||||
<a id="lineNoToggle" href="#" onclick="toggleLineNumbers();"></a>
|
||||
<script>
|
||||
function toggleLineNumbers() {
|
||||
@@ -4564,6 +4565,7 @@ document.getElementsByTagName("head")[0].appendChild(style);
|
||||
toggleLineNumbers();
|
||||
</script>
|
||||
';
|
||||
}
|
||||
} elsif (defined $type && $type eq 'tree') {
|
||||
print $cgi->a({-href => href(action=>"tree", file_name=>$file_name,
|
||||
hash_base=>$hb),
|
||||
|
||||
Reference in New Issue
Block a user