2b07ff3ffa
The fixLinks() function adds 'js=1' to each link that does not already have 'js' query parameter specified. This is used to signal to gitweb that the browser can actually do javascript when these links are used. There are two problems with the existing code: 1. URIs with fragment and 'js' query parameter, like e.g. ...foo?js=0#l199 were not recognized as having 'js' query parameter already. 2. The 'js' query parameter, in the form of either '?js=1' or ';js=1' was appended at the end of URI, even if it included a fragment (had a hash part). This lead to the incorrect links like this ...foo#l199?js=1 instead of adding query parameter as last part of query, but before the fragment part, i.e. ...foo?js=1#l199 Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
---|---|---|
.. | ||
lib | ||
blame_incremental.js | ||
javascript-detection.js | ||
README |
GIT web interface (gitweb) - JavaScript ======================================= This directory holds JavaScript code used by gitweb (GIT web interface). Scripts from there would be concatenated together in the order specified by gitweb/Makefile into gitweb/static/gitweb.js, during building of gitweb/gitweb.cgi (during gitweb building). The resulting file (or its minification) would then be installed / deployed together with gitweb. Scripts in 'lib/' subdirectory compose generic JavaScript library, providing features required by gitweb but in no way limited to gitweb only. In the future those scripts could be replaced by some JavaScript library / framework, like e.g. jQuery, YUI, Prototype, MooTools, Dojo, ExtJS, Script.aculo.us or SproutCore. All scripts that manipulate gitweb output should be put outside 'lib/', directly in this directory ('gitweb/static/js/'). Those scripts would have to be rewritten if gitweb moves to using some JavaScript library. See also comments in gitweb/Makefile.