Get rid of unnecessary writes.
This commit is contained in:
parent
1b6095ec26
commit
d4bafd67e2
@ -7,7 +7,7 @@ QuoteThreading =
|
|||||||
return unless Conf['Quote Threading'] and g.VIEW is 'thread'
|
return unless Conf['Quote Threading'] and g.VIEW is 'thread'
|
||||||
|
|
||||||
@controls = $.el 'span',
|
@controls = $.el 'span',
|
||||||
<%= html('<label><input id="threadingControl" type="checkbox"> Threading</label>') %>
|
<%= html('<label><input id="threadingControl" name="Thread Quotes" type="checkbox"> Threading</label>') %>
|
||||||
|
|
||||||
@threadNewLink = $.el 'span',
|
@threadNewLink = $.el 'span',
|
||||||
className: 'brackets-wrap threadnewlink'
|
className: 'brackets-wrap threadnewlink'
|
||||||
@ -17,6 +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', @rethread
|
$.on @input, 'change', @rethread
|
||||||
$.on @threadNewLink.firstElementChild, 'click', @rethread
|
$.on @threadNewLink.firstElementChild, 'click', @rethread
|
||||||
|
|
||||||
@ -114,9 +115,6 @@ QuoteThreading =
|
|||||||
|
|
||||||
QuoteThreading.threadNewLink.hidden = true
|
QuoteThreading.threadNewLink.hidden = true
|
||||||
|
|
||||||
Conf['Thread Quotes'] = QuoteThreading.input.checked
|
|
||||||
$.set 'Thread Quotes', Conf['Thread Quotes']
|
|
||||||
|
|
||||||
if Conf['Thread Quotes']
|
if Conf['Thread Quotes']
|
||||||
posts.forEach QuoteThreading.insert
|
posts.forEach QuoteThreading.insert
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user