diff --git a/src/main/twirl/gitbucket/core/repo/blob.scala.html b/src/main/twirl/gitbucket/core/repo/blob.scala.html
index 92d3612..c7a057e 100644
--- a/src/main/twirl/gitbucket/core/repo/blob.scala.html
+++ b/src/main/twirl/gitbucket/core/repo/blob.scala.html
@@ -29,6 +29,7 @@
Older
+
@repository.name /
@pathList.zipWithIndex.map { case (section, i) =>
@if(i == pathList.length - 1){
@@ -130,14 +132,18 @@
}
var line = pos[i].id.replace(/^L/,'');
var hash = location.hash;
+ var commitUrl = '@helpers.url(repository)/blob/@latestCommit.id/@pathList.mkString("/")';
if(e.shiftKey == true && hash.match(/#L\d+(-L\d+)?/)){
var lines = hash.split('-');
- location.hash = lines[0] + '-L' + line;
+ window.history.pushState('', '', commitUrl + lines[0] + '-L' + line);
} else {
var p = $("#L"+line).attr('id',"");
- location.hash = '#L' + line;
+ window.history.pushState('', '', commitUrl + '#L' + line);
p.attr('id','L'+line);
}
+ $("#branchCtrlWrapper .btn .muted").text("tree:");
+ $("#branchCtrlWrapper .btn .strong").text("@latestCommit.id.substring(0, 10)");
+ updateHighlighting();
}).appendTo(pre);
}
}