Make 'Threading' and 'Show Last <n>' checkboxes turn each other off.
This commit is contained in:
parent
a567752ba1
commit
f6010ca298
@ -407,7 +407,7 @@ Config =
|
|||||||
]
|
]
|
||||||
'Reply Pruning': [
|
'Reply Pruning': [
|
||||||
true
|
true
|
||||||
'Hide old replies in long threads. Number of replies shown can be set from header menu. Not compatible with Quote Threading.'
|
'Hide old replies in long threads. Number of replies shown can be set from header menu.'
|
||||||
]
|
]
|
||||||
|
|
||||||
'Posting and Captchas':
|
'Posting and Captchas':
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
ReplyPruning =
|
ReplyPruning =
|
||||||
init: ->
|
init: ->
|
||||||
return unless g.VIEW is 'thread' and Conf['Reply Pruning'] and not Conf['Quote Threading']
|
return unless g.VIEW is 'thread' and Conf['Reply Pruning']
|
||||||
|
|
||||||
|
if Conf['Quote Threading'] and Conf['Thread Quotes'] and Conf['Prune Replies']
|
||||||
|
Conf['Prune Replies'] = false
|
||||||
|
$.set 'Prune Replies', false
|
||||||
|
|
||||||
@container = $.frag()
|
@container = $.frag()
|
||||||
|
|
||||||
@ -15,7 +19,7 @@ ReplyPruning =
|
|||||||
enabled: label.firstElementChild
|
enabled: label.firstElementChild
|
||||||
replies: el.lastElementChild
|
replies: el.lastElementChild
|
||||||
|
|
||||||
$.on @inputs.enabled, 'change', $.cb.checked
|
$.on @inputs.enabled, 'change', @setEnabled
|
||||||
$.on @inputs.replies, 'change', $.cb.value
|
$.on @inputs.replies, 'change', $.cb.value
|
||||||
|
|
||||||
Header.menu.addEntry
|
Header.menu.addEntry
|
||||||
@ -30,6 +34,13 @@ ReplyPruning =
|
|||||||
hidden: 0
|
hidden: 0
|
||||||
total: 0
|
total: 0
|
||||||
|
|
||||||
|
setEnabled: ->
|
||||||
|
other = QuoteThreading.input
|
||||||
|
if @checked and other?.checked
|
||||||
|
other.checked = false
|
||||||
|
$.event 'change', null, other
|
||||||
|
$.cb.checked.call @
|
||||||
|
|
||||||
node: ->
|
node: ->
|
||||||
ReplyPruning.thread = @
|
ReplyPruning.thread = @
|
||||||
ReplyPruning.total = @posts.keys.length - 1
|
ReplyPruning.total = @posts.keys.length - 1
|
||||||
|
|||||||
@ -17,7 +17,7 @@ QuoteThreading =
|
|||||||
@input = $('input', @controls)
|
@input = $('input', @controls)
|
||||||
@input.checked = Conf['Thread Quotes']
|
@input.checked = Conf['Thread Quotes']
|
||||||
|
|
||||||
$.on @input, 'change', $.cb.checked
|
$.on @input, 'change', @setEnabled
|
||||||
$.on @input, 'change', @rethread
|
$.on @input, 'change', @rethread
|
||||||
$.on @threadNewLink.firstElementChild, 'click', @rethread
|
$.on @threadNewLink.firstElementChild, 'click', @rethread
|
||||||
$.on d, '4chanXInitFinished', => @ready = true
|
$.on d, '4chanXInitFinished', => @ready = true
|
||||||
@ -38,6 +38,13 @@ QuoteThreading =
|
|||||||
children: {}
|
children: {}
|
||||||
inserted: {}
|
inserted: {}
|
||||||
|
|
||||||
|
setEnabled: ->
|
||||||
|
other = ReplyPruning.inputs?.enabled
|
||||||
|
if @checked and other?.checked
|
||||||
|
other.checked = false
|
||||||
|
$.event 'change', null, other
|
||||||
|
$.cb.checked.call @
|
||||||
|
|
||||||
setThread: ->
|
setThread: ->
|
||||||
QuoteThreading.thread = @
|
QuoteThreading.thread = @
|
||||||
$.asap (-> !Conf['Thread Updater'] or $ '.navLinksBot > .updatelink'), ->
|
$.asap (-> !Conf['Thread Updater'] or $ '.navLinksBot > .updatelink'), ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user