in-thread thread-nav; closes #147
This commit is contained in:
parent
24c2aa168a
commit
14c8d15c86
@ -912,6 +912,14 @@
|
||||
},
|
||||
scroll: function(delta) {
|
||||
var i, rect, thread, top, _ref;
|
||||
if (g.REPLY) {
|
||||
if (delta === -1) {
|
||||
window.scrollTo(0, 0);
|
||||
} else {
|
||||
window.scrollTo(0, d.body.scrollHeight);
|
||||
}
|
||||
return;
|
||||
}
|
||||
_ref = nav.getThread(true), thread = _ref[0], i = _ref[1], rect = _ref[2];
|
||||
top = rect.top;
|
||||
if (!((delta === -1 && Math.ceil(top) < 0) || (delta === +1 && top > 1))) {
|
||||
@ -2574,6 +2582,9 @@
|
||||
if ($.config('Keybinds')) {
|
||||
keybinds.init();
|
||||
}
|
||||
if ($.config('Thread Navigation')) {
|
||||
nav.init();
|
||||
}
|
||||
threading.init();
|
||||
if (g.REPLY) {
|
||||
if ($.config('Thread Updater')) {
|
||||
@ -2601,9 +2612,6 @@
|
||||
if ($.config('Thread Hiding')) {
|
||||
threadHiding.init();
|
||||
}
|
||||
if ($.config('Thread Navigation')) {
|
||||
nav.init();
|
||||
}
|
||||
if ($.config('Thread Expansion')) {
|
||||
expandThread.init();
|
||||
}
|
||||
|
||||
@ -675,6 +675,13 @@ nav =
|
||||
return null
|
||||
|
||||
scroll: (delta) ->
|
||||
if g.REPLY
|
||||
if delta is -1
|
||||
window.scrollTo 0,0
|
||||
else
|
||||
window.scrollTo 0, d.body.scrollHeight
|
||||
return
|
||||
|
||||
[thread, i, rect] = nav.getThread true
|
||||
{top} = rect
|
||||
|
||||
@ -1947,6 +1954,9 @@ main =
|
||||
if $.config 'Keybinds'
|
||||
keybinds.init()
|
||||
|
||||
if $.config 'Thread Navigation'
|
||||
nav.init()
|
||||
|
||||
threading.init()
|
||||
|
||||
if g.REPLY
|
||||
@ -1976,9 +1986,6 @@ main =
|
||||
if $.config 'Thread Hiding'
|
||||
threadHiding.init()
|
||||
|
||||
if $.config 'Thread Navigation'
|
||||
nav.init()
|
||||
|
||||
if $.config 'Thread Expansion'
|
||||
expandThread.init()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user