]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Make linking to actions requiring JavaScript a feature
[Gitweb] / gitweb.perl
index 9f890aa4fce341a1d7af891cac0498db4bccdd23210b810271330af4cddf8844..2179bc4c4a56dce2c1fac5fb843538fe22a4ad4daaeddf22230f388811df4bd4 100755 (executable)
@@ -433,6 +433,13 @@ our %feature = (
        'timed' => {
                'override' => 0,
                'default' => [0]},
+
+       # Enable turning some links into links to actions which require
+       # JavaScript to run (like 'blame_incremental').  Not enabled by
+       # default.  Project specific override is currently not supported.
+       'javascript-actions' => {
+               'override' => 0,
+               'default' => [0]},
 );
 
 sub gitweb_get_feature {
@@ -3327,7 +3334,7 @@ sub git_footer_html {
                      qq!startBlame("!. href(action=>"blame_data", -replay=>1) .qq!",\n!.
                      qq!           "!. href() .qq!");\n!.
                      qq!</script>\n!;
-       } else {
+       } elsif (gitweb_check_feature('javascript-actions')) {
                print qq!<script type="text/javascript">\n!.
                      qq!window.onload = fixLinks;\n!.
                      qq!</script>\n!;
This page took 0.255098 seconds and 4 git commands to generate.