(refs #773)Fix url processing in the blame view

This commit is contained in:
Naoki Takezoe
2015-06-02 01:06:02 +09:00
parent 8f4e285974
commit badb747d24

View File

@@ -152,7 +152,7 @@ $(window).load(function(){
}); });
function updateBlame(){ function updateBlame(){
var m = /^\/(blame|blob)(\/.*)$/.exec(location.pathname.substring(repository.length)); var m = /^\/(blame|blob)(\/.*)$/.exec(location.href.substring(repository.length));
var mode = m[1]; var mode = m[1];
$('.blame-action').toggleClass("active", mode=='blame').attr('href', repository + (m[1]=='blame'?'/blob':'/blame')+m[2]); $('.blame-action').toggleClass("active", mode=='blame').attr('href', repository + (m[1]=='blame'?'/blob':'/blame')+m[2]);
if(pre.parents("td").find(".blame").length){ if(pre.parents("td").find(".blame").length){