From c86c706406dd32fb380ad35907e59b6b287c3071 Mon Sep 17 00:00:00 2001 From: Naoki Takezoe Date: Mon, 24 Aug 2015 02:40:29 +0900 Subject: [PATCH] (refs #864)Fix blame --- src/main/twirl/gitbucket/core/repo/blob.scala.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/twirl/gitbucket/core/repo/blob.scala.html b/src/main/twirl/gitbucket/core/repo/blob.scala.html index 6bbccd312..9b3beade8 100644 --- a/src/main/twirl/gitbucket/core/repo/blob.scala.html +++ b/src/main/twirl/gitbucket/core/repo/blob.scala.html @@ -147,7 +147,7 @@ $(window).load(function(){ }); function updateBlame(){ - var m = /^\/(blame|blob)(\/.*)$/.exec(location.href.substring(repository.length)); + var m = /\/(blame|blob)(\/.*)$/.exec(location.href); var mode = m[1]; $('.blame-action').toggleClass("active", mode=='blame').attr('href', repository + (m[1] == 'blame' ? '/blob' : '/blame') + m[2]); if(pre.parents("div.box-content-bottom").find(".blame").length){ @@ -159,7 +159,7 @@ $(window).load(function(){ updateSourceLineNum(); return; } - $(document.body).toggleClass('no-box-shadow',document.body.style.boxShadow===undefined); + $(document.body).toggleClass('no-box-shadow', document.body.style.boxShadow===undefined); $('.blame-action').addClass("active"); var base = $('
').css({height: pre.height()}).prependTo(pre.parents("div.box-content-bottom")); base.parents("div.container").addClass("blame-container");