Thread/Reply Button/Menu links configs changes. #932

This commit is contained in:
Nicolas Stepien 2013-03-24 04:44:24 +01:00
parent e7d00f87e1
commit 1d4d5f9b1f
2 changed files with 11 additions and 10 deletions

View File

@ -17,9 +17,8 @@ Config =
'Anonymize': [false, 'Make everyone Anonymous.'] 'Anonymize': [false, 'Make everyone Anonymous.']
'Filter': [true, 'Self-moderation placebo.'] 'Filter': [true, 'Self-moderation placebo.']
'Recursive Hiding': [true, 'Hide replies of hidden posts, recursively.'] 'Recursive Hiding': [true, 'Hide replies of hidden posts, recursively.']
'Thread Hiding': [true, 'Hide entire threads.'] 'Thread Hiding': [true, 'Add buttons to hide entire threads.']
'Reply Hiding': [true, 'Hide single replies.'] 'Reply Hiding': [true, 'Add buttons to hide single replies.']
'Hiding Buttons': [true, 'Add buttons to hide threads / replies, in addition to menu links.']
'Stubs': [true, 'Show stubs of hidden threads / replies.'] 'Stubs': [true, 'Show stubs of hidden threads / replies.']
'Images': 'Images':
'Auto-GIF': [false, 'Animate GIF thumbnails (disabled on /gif/, /wsg/).'] 'Auto-GIF': [false, 'Animate GIF thumbnails (disabled on /gif/, /wsg/).']
@ -30,6 +29,8 @@ Config =
'Menu': 'Menu':
'Menu': [true, 'Add a drop-down menu to posts.'] 'Menu': [true, 'Add a drop-down menu to posts.']
'Report Link': [true, 'Add a report link to the menu.'] 'Report Link': [true, 'Add a report link to the menu.']
'Thread Hiding Link': [true, 'Add a link to hide entire threads.']
'Reply Hiding Link': [true, 'Add a link to hide single replies.']
'Delete Link': [true, 'Add post and image deletion links to the menu.'] 'Delete Link': [true, 'Add post and image deletion links to the menu.']
'Download Link': [true, 'Add a download with original filename link to the menu. Chrome-only currently.'] 'Download Link': [true, 'Add a download with original filename link to the menu. Chrome-only currently.']
'Archive Link': [true, 'Add an archive link to the menu.'] 'Archive Link': [true, 'Add an archive link to the menu.']

View File

@ -975,7 +975,7 @@ Filter =
ThreadHiding = ThreadHiding =
init: -> init: ->
return if g.VIEW isnt 'index' or !Conf['Thread Hiding'] return if g.VIEW isnt 'index' or !Conf['Thread Hiding'] and !Conf['Thread Hiding Link']
Misc.clearThreads "hiddenThreads.#{g.BOARD}" Misc.clearThreads "hiddenThreads.#{g.BOARD}"
@getHiddenThreads() @getHiddenThreads()
@ -987,7 +987,7 @@ ThreadHiding =
node: -> node: ->
if data = ThreadHiding.hiddenThreads.threads[@] if data = ThreadHiding.hiddenThreads.threads[@]
ThreadHiding.hide @, data.makeStub ThreadHiding.hide @, data.makeStub
return unless Conf['Hiding Buttons'] return unless Conf['Thread Hiding']
$.prepend @OP.nodes.root, ThreadHiding.makeButton @, 'hide' $.prepend @OP.nodes.root, ThreadHiding.makeButton @, 'hide'
getHiddenThreads: -> getHiddenThreads: ->
@ -1015,7 +1015,7 @@ ThreadHiding =
menu: menu:
init: -> init: ->
return if g.VIEW isnt 'index' or !Conf['Menu'] or !Conf['Thread Hiding'] return if g.VIEW isnt 'index' or !Conf['Menu'] or !Conf['Thread Hiding Link']
div = $.el 'div', div = $.el 'div',
className: 'hide-thread-link' className: 'hide-thread-link'
@ -1117,7 +1117,7 @@ ThreadHiding =
ReplyHiding = ReplyHiding =
init: -> init: ->
return if g.VIEW is 'catalog' or !Conf['Reply Hiding'] return if g.VIEW is 'catalog' or !Conf['Reply Hiding'] and !Conf['Reply Hiding Link']
Misc.clearThreads "hiddenPosts.#{g.BOARD}" Misc.clearThreads "hiddenPosts.#{g.BOARD}"
@getHiddenPosts() @getHiddenPosts()
@ -1134,7 +1134,7 @@ ReplyHiding =
else else
Recursive.apply ReplyHiding.hide, @, data.makeStub, true Recursive.apply ReplyHiding.hide, @, data.makeStub, true
Recursive.add ReplyHiding.hide, @, data.makeStub, true Recursive.add ReplyHiding.hide, @, data.makeStub, true
return unless Conf['Hiding Buttons'] return unless Conf['Reply Hiding']
$.replace $('.sideArrows', @nodes.root), ReplyHiding.makeButton @, 'hide' $.replace $('.sideArrows', @nodes.root), ReplyHiding.makeButton @, 'hide'
getHiddenPosts: -> getHiddenPosts: ->
@ -1142,7 +1142,7 @@ ReplyHiding =
menu: menu:
init: -> init: ->
return if g.VIEW is 'catalog' or !Conf['Menu'] or !Conf['Reply Hiding'] return if g.VIEW is 'catalog' or !Conf['Menu'] or !Conf['Reply Hiding Link']
# Hide # Hide
div = $.el 'div', div = $.el 'div',
@ -1352,7 +1352,7 @@ Recursive =
QuoteStrikeThrough = QuoteStrikeThrough =
init: -> init: ->
return if g.VIEW is 'catalog' or !Conf['Reply Hiding'] and !Conf['Filter'] return if g.VIEW is 'catalog' or !Conf['Reply Hiding'] and !Conf['Reply Hiding Link'] and !Conf['Filter']
Post::callbacks.push Post::callbacks.push
name: 'Strike-through Quotes' name: 'Strike-through Quotes'