Merge branch 'maint-1.7.6' into maint
* maint-1.7.6: notes_merge_commit(): do not pass temporary buffer to other function gitweb: Fix links to lines in blobs when javascript-actions are enabled mergetool: no longer need to save standard input mergetool: Use args as pathspec to unmerged files t9159-*.sh: skip for mergeinfo test for svn <= 1.4 date.c: Support iso8601 timezone formats remote: only update remote-tracking branch if updating refspec remote rename: warn when refspec was not updated remote: "rename o foo" should not rename ref "origin/bar" remote: write correct fetch spec when renaming remote 'remote'
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
* and other reasons to not add 'js=1' param at the end of link
|
||||
* @constant
|
||||
*/
|
||||
var jsExceptionsRe = /[;?]js=[01]$/;
|
||||
var jsExceptionsRe = /[;?]js=[01](#.*)?$/;
|
||||
|
||||
/**
|
||||
* Add '?js=1' or ';js=1' to the end of every link in the document
|
||||
@ -33,9 +33,9 @@ function fixLinks() {
|
||||
var allLinks = document.getElementsByTagName("a") || document.links;
|
||||
for (var i = 0, len = allLinks.length; i < len; i++) {
|
||||
var link = allLinks[i];
|
||||
if (!jsExceptionsRe.test(link)) { // =~ /[;?]js=[01]$/;
|
||||
link.href +=
|
||||
(link.href.indexOf('?') === -1 ? '?' : ';') + 'js=1';
|
||||
if (!jsExceptionsRe.test(link)) {
|
||||
link.href = link.href.replace(/(#|$)/,
|
||||
(link.href.indexOf('?') === -1 ? '?' : ';') + 'js=1$1');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user