diff --git a/CHANGELOG.md b/CHANGELOG.md index f7f5f96e8..529c43c0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ - Added possibility to combine board-list toggle and custom text. -- Fix Thread Hiding initialization error. +- Added Reply Navigation back in, disabled by default. +- Fixed Thread Hiding initialization error. # 3.0.0 - *2013-04-07* diff --git a/src/config.coffee b/src/config.coffee index ba0d378ab..cdc746f3f 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -11,6 +11,7 @@ Config = 'Comment Expansion': [true, 'Add buttons to expand too long comments.'] 'Thread Expansion': [true, 'Add buttons to expand threads.'] 'Index Navigation': [false, 'Add buttons to navigate between threads.'] + 'Reply Navigation': [false, 'Add buttons to navigate to top / bottom of thread.'] 'Check for Updates': [true, 'Notify when updated versions of <%= meta.name %> are available.'] 'Filtering': 'Anonymize': [false, 'Make everyone Anonymous.'] diff --git a/src/features.coffee b/src/features.coffee index 7e12a793a..b57ddf1af 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -1928,7 +1928,7 @@ Keybinds = Nav = init: -> - return if g.VIEW isnt 'index' or !Conf['Index Navigation'] + return if g.VIEW is 'index' and !Conf['Index Navigation'] or g.VIEW is 'thread' and !Conf['Reply Navigation'] span = $.el 'span', id: 'navlinks' @@ -1946,10 +1946,16 @@ Nav = $.on d, '4chanXInitFinished', -> $.add d.body, span prev: -> - Nav.scroll -1 + if g.VIEW is 'thread' + window.scrollTo 0, 0 + else + Nav.scroll -1 next: -> - Nav.scroll +1 + if g.VIEW is 'thread' + window.scrollTo 0, d.body.scrollHeight + else + Nav.scroll +1 getThread: (full) -> headRect = Header.bar.getBoundingClientRect()