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': [
|
||||
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':
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
ReplyPruning =
|
||||
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()
|
||||
|
||||
@ -15,7 +19,7 @@ ReplyPruning =
|
||||
enabled: label.firstElementChild
|
||||
replies: el.lastElementChild
|
||||
|
||||
$.on @inputs.enabled, 'change', $.cb.checked
|
||||
$.on @inputs.enabled, 'change', @setEnabled
|
||||
$.on @inputs.replies, 'change', $.cb.value
|
||||
|
||||
Header.menu.addEntry
|
||||
@ -30,6 +34,13 @@ ReplyPruning =
|
||||
hidden: 0
|
||||
total: 0
|
||||
|
||||
setEnabled: ->
|
||||
other = QuoteThreading.input
|
||||
if @checked and other?.checked
|
||||
other.checked = false
|
||||
$.event 'change', null, other
|
||||
$.cb.checked.call @
|
||||
|
||||
node: ->
|
||||
ReplyPruning.thread = @
|
||||
ReplyPruning.total = @posts.keys.length - 1
|
||||
|
||||
@ -17,7 +17,7 @@ QuoteThreading =
|
||||
@input = $('input', @controls)
|
||||
@input.checked = Conf['Thread Quotes']
|
||||
|
||||
$.on @input, 'change', $.cb.checked
|
||||
$.on @input, 'change', @setEnabled
|
||||
$.on @input, 'change', @rethread
|
||||
$.on @threadNewLink.firstElementChild, 'click', @rethread
|
||||
$.on d, '4chanXInitFinished', => @ready = true
|
||||
@ -38,6 +38,13 @@ QuoteThreading =
|
||||
children: {}
|
||||
inserted: {}
|
||||
|
||||
setEnabled: ->
|
||||
other = ReplyPruning.inputs?.enabled
|
||||
if @checked and other?.checked
|
||||
other.checked = false
|
||||
$.event 'change', null, other
|
||||
$.cb.checked.call @
|
||||
|
||||
setThread: ->
|
||||
QuoteThreading.thread = @
|
||||
$.asap (-> !Conf['Thread Updater'] or $ '.navLinksBot > .updatelink'), ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user