aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-09-15 00:14:21 +0300
committerGravatar Vitaly Takmazov2016-09-15 00:14:21 +0300
commitc410bf67edd2fb7590b813871d2a45843584aa32 (patch)
treeca42c326c1d7ffc0170b1fcbb4e6ab7da1a0a070 /juick-www/src/main
parent4db3d0d9c7625b6d1b521158e7b9e900c667f286 (diff)
parent975b300c01485317cbc1eaef160201ecd5a629de (diff)
Merge branch 'master' of x.juick.com:/srv/git/juick
Diffstat (limited to 'juick-www/src/main')
-rw-r--r--juick-www/src/main/static/scripts.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js
index a5f7c4c0..ebeba198 100644
--- a/juick-www/src/main/static/scripts.js
+++ b/juick-www/src/main/static/scripts.js
@@ -80,7 +80,7 @@ function wsShutdown() {
function isTreeMode() {
// relies on UserThread.printReplies implementation TODO keep this in cookie or something
- return document.querySelector('.title2-right a').href.match(/\?view=(\w+)/)[1] == 'list';
+ return document.querySelector('.title2-right > a').href.match(/\?view=(\w+)/)[1] == 'list';
}
function wsIncomingReply(msg) {
@@ -157,7 +157,7 @@ function wsIncomingReply(msg) {
if (isTreeMode() && (msg.replyto > 0)) {
var p = document.getElementById(msg.replyto);
var m = parseInt(p.style.marginLeft) + 20;
- while (p.nextElementSibling && (parseInt(p.nextElementSibling.style.marginLeft) == m)) p = p.nextElementSibling;
+ while (p.nextElementSibling && (parseInt(p.nextElementSibling.style.marginLeft) >= m)) p = p.nextElementSibling;
li.style.marginLeft = m + 'px';
p.parentNode.insertBefore(li, p.nextSibling);
} else {