js: offsetScroll to elements that are found
This commit is contained in:
parent
3469c46507
commit
8d9db09b41
3 changed files with 9 additions and 3 deletions
|
|
@ -375,7 +375,9 @@
|
|||
if (location.hash) {
|
||||
var result = splitDelimitedHash(location.hash);
|
||||
var line = $('html').find(result.loc);
|
||||
offsetScroll(line, 70);
|
||||
if (line.length > 0){
|
||||
offsetScroll(line, 70);
|
||||
}
|
||||
}
|
||||
|
||||
// browse tree @ revision
|
||||
|
|
|
|||
|
|
@ -177,7 +177,9 @@
|
|||
var _first_line = $('#L' + h_lines[0]).get(0);
|
||||
if (_first_line) {
|
||||
var line = $('#L' + h_lines[0]);
|
||||
offsetScroll(line, 70);
|
||||
if (line.length > 0){
|
||||
offsetScroll(line, 70);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -415,7 +415,9 @@
|
|||
if (location.hash) {
|
||||
var result = splitDelimitedHash(location.hash);
|
||||
var line = $('html').find(result.loc);
|
||||
offsetScroll(line, 70);
|
||||
if (line.length > 0){
|
||||
offsetScroll(line, 70);
|
||||
}
|
||||
}
|
||||
$(function(){
|
||||
ReviewerAutoComplete('user');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue