summaryrefslogtreecommitdiff
path: root/js/threadscroll.js
diff options
context:
space:
mode:
authorkaernyk <kaernyk@gmail.com>2014-09-28 04:30:22 -0400
committerkaernyk <kaernyk@gmail.com>2014-09-28 04:30:22 -0400
commitf6e827ca75453f8769d725056460194c55c95696 (patch)
tree22cce8b0a7c1eb8d459b1233105566e5e28daf90 /js/threadscroll.js
parent78cf4a8b56393358a6383d258bc237e481b7b323 (diff)
parent197e4d4bfcb5a312a699e1f6d012da03ee36fbe2 (diff)
Merge branch 'master' of https://github.com/kaernyk/vichan
Conflicts: stylesheets/style.css
Diffstat (limited to 'js/threadscroll.js')
-rw-r--r--js/threadscroll.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/threadscroll.js b/js/threadscroll.js
index c3c6deef..0a233f58 100644
--- a/js/threadscroll.js
+++ b/js/threadscroll.js
@@ -16,7 +16,7 @@ if(active_page == "index" || active_page == "ukko"){
if(par.length == 1){
if(par.prev().attr("id") != null){
if(par.prev().attr("id").match("^thread")){
- window.location.href = window.location.protocol+"//"+window.location.host+window.location.pathname+"#"+par.prev().attr("id");
+ par.prev()[0].scrollIntoView(true);
}
}
}
@@ -28,7 +28,7 @@ if(active_page == "index" || active_page == "ukko"){
if(par.length == 1){
if(par.next().attr("id") != null){
if(par.next().attr("id").match("^thread")){
- window.location.href = window.location.protocol+"//"+window.location.host+window.location.pathname+"#"+par.next().attr("id");
+ par.next()[0].scrollIntoView(true);
}
}
}