Activate appropriate features on previews shown in archive. #1256
This commit is contained in:
parent
edd7e14cf3
commit
fc8684282f
@ -1,7 +1,8 @@
|
|||||||
Anonymize =
|
Anonymize =
|
||||||
init: ->
|
init: ->
|
||||||
return unless g.VIEW in ['index', 'thread', 'archive'] and Conf['Anonymize']
|
return unless g.VIEW in ['index', 'thread', 'archive'] and Conf['Anonymize']
|
||||||
return @archive() if g.VIEW is 'archive'
|
|
||||||
|
@archive() if g.VIEW is 'archive'
|
||||||
|
|
||||||
Callbacks.Post.push
|
Callbacks.Post.push
|
||||||
name: 'Anonymize'
|
name: 'Anonymize'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
FappeTyme =
|
FappeTyme =
|
||||||
init: ->
|
init: ->
|
||||||
return unless (Conf['Fappe Tyme'] or Conf['Werk Tyme']) and g.VIEW in ['index', 'thread']
|
return unless (Conf['Fappe Tyme'] or Conf['Werk Tyme']) and g.VIEW in ['index', 'thread', 'archive']
|
||||||
|
|
||||||
@nodes = {}
|
@nodes = {}
|
||||||
@enabled =
|
@enabled =
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
ImageLoader =
|
ImageLoader =
|
||||||
init: ->
|
init: ->
|
||||||
return unless g.VIEW in ['index', 'thread'] and g.BOARD.ID isnt 'f'
|
return unless g.VIEW in ['index', 'thread', 'archive'] and g.BOARD.ID isnt 'f'
|
||||||
return unless Conf['Image Prefetching'] or
|
return unless Conf['Image Prefetching'] or
|
||||||
Conf['Replace JPG'] or Conf['Replace PNG'] or Conf['Replace GIF'] or Conf['Replace WEBM']
|
Conf['Replace JPG'] or Conf['Replace PNG'] or Conf['Replace GIF'] or Conf['Replace WEBM']
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
RevealSpoilers =
|
RevealSpoilers =
|
||||||
init: ->
|
init: ->
|
||||||
return unless g.VIEW in ['index', 'thread'] and Conf['Reveal Spoiler Thumbnails']
|
return unless g.VIEW in ['index', 'thread', 'archive'] and Conf['Reveal Spoiler Thumbnails']
|
||||||
|
|
||||||
Callbacks.Post.push
|
Callbacks.Post.push
|
||||||
name: 'Reveal Spoiler Thumbnails'
|
name: 'Reveal Spoiler Thumbnails'
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
Embedding =
|
Embedding =
|
||||||
init: ->
|
init: ->
|
||||||
return unless g.VIEW in ['index', 'thread'] and Conf['Linkify'] and (Conf['Embedding'] or Conf['Link Title'] or Conf['Cover Preview'])
|
return unless g.VIEW in ['index', 'thread', 'archive'] and Conf['Linkify'] and (Conf['Embedding'] or Conf['Link Title'] or Conf['Cover Preview'])
|
||||||
@types = {}
|
@types = {}
|
||||||
@types[type.key] = type for type in @ordered_types
|
@types[type.key] = type for type in @ordered_types
|
||||||
|
|
||||||
if Conf['Embedding']
|
if Conf['Embedding'] and g.VIEW isnt 'archive'
|
||||||
@dialog = UI.dialog 'embedding',
|
@dialog = UI.dialog 'embedding',
|
||||||
<%= readHTML('Embed.html') %>
|
<%= readHTML('Embed.html') %>
|
||||||
@media = $ '#media-embed', @dialog
|
@media = $ '#media-embed', @dialog
|
||||||
@ -22,6 +22,7 @@ Embedding =
|
|||||||
return
|
return
|
||||||
|
|
||||||
events: (post) ->
|
events: (post) ->
|
||||||
|
return if g.VIEW is 'archive'
|
||||||
if Conf['Embedding']
|
if Conf['Embedding']
|
||||||
i = 0
|
i = 0
|
||||||
items = post.nodes.embedlinks = $$ '.embedder', post.nodes.comment
|
items = post.nodes.embedlinks = $$ '.embedder', post.nodes.comment
|
||||||
@ -41,9 +42,9 @@ Embedding =
|
|||||||
return if $.x 'ancestor::pre', link
|
return if $.x 'ancestor::pre', link
|
||||||
if data = Embedding.services link
|
if data = Embedding.services link
|
||||||
data.post = post
|
data.post = post
|
||||||
Embedding.embed data if Conf['Embedding']
|
Embedding.embed data if Conf['Embedding'] and g.VIEW isnt 'archive'
|
||||||
Embedding.title data if Conf['Link Title']
|
Embedding.title data if Conf['Link Title']
|
||||||
Embedding.preview data if Conf['Cover Preview']
|
Embedding.preview data if Conf['Cover Preview'] and g.VIEW isnt 'archive'
|
||||||
|
|
||||||
services: (link) ->
|
services: (link) ->
|
||||||
{href} = link
|
{href} = link
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
Linkify =
|
Linkify =
|
||||||
init: ->
|
init: ->
|
||||||
return if g.VIEW not in ['index', 'thread'] or not Conf['Linkify']
|
return if g.VIEW not in ['index', 'thread', 'archive'] or not Conf['Linkify']
|
||||||
|
|
||||||
if Conf['Comment Expansion']
|
if Conf['Comment Expansion']
|
||||||
ExpandComment.callbacks.push @node
|
ExpandComment.callbacks.push @node
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
FileInfo =
|
FileInfo =
|
||||||
init: ->
|
init: ->
|
||||||
return if g.VIEW not in ['index', 'thread'] or !Conf['File Info Formatting']
|
return if g.VIEW not in ['index', 'thread', 'archive'] or !Conf['File Info Formatting']
|
||||||
|
|
||||||
Callbacks.Post.push
|
Callbacks.Post.push
|
||||||
name: 'File Info Formatting'
|
name: 'File Info Formatting'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
Fourchan =
|
Fourchan =
|
||||||
init: ->
|
init: ->
|
||||||
return unless g.VIEW in ['index', 'thread']
|
return unless g.VIEW in ['index', 'thread', 'archive']
|
||||||
|
|
||||||
if g.BOARD.ID is 'g'
|
if g.BOARD.ID is 'g'
|
||||||
$.on window, 'prettyprint:cb', (e) ->
|
$.on window, 'prettyprint:cb', (e) ->
|
||||||
|
|||||||
@ -3,7 +3,7 @@ RelativeDates =
|
|||||||
|
|
||||||
init: ->
|
init: ->
|
||||||
if (
|
if (
|
||||||
g.VIEW in ['index', 'thread'] and Conf['Relative Post Dates'] and !Conf['Relative Date Title'] or
|
g.VIEW in ['index', 'thread', 'archive'] and Conf['Relative Post Dates'] and !Conf['Relative Date Title'] or
|
||||||
g.VIEW is 'index' and Conf['JSON Index'] and g.BOARD.ID isnt 'f'
|
g.VIEW is 'index' and Conf['JSON Index'] and g.BOARD.ID isnt 'f'
|
||||||
)
|
)
|
||||||
@flush()
|
@flush()
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
Time =
|
Time =
|
||||||
init: ->
|
init: ->
|
||||||
return unless g.VIEW in ['index', 'thread'] and Conf['Time Formatting']
|
return unless g.VIEW in ['index', 'thread', 'archive'] and Conf['Time Formatting']
|
||||||
|
|
||||||
Callbacks.Post.push
|
Callbacks.Post.push
|
||||||
name: 'Time Formatting'
|
name: 'Time Formatting'
|
||||||
|
|||||||
@ -63,6 +63,8 @@ ThreadWatcher =
|
|||||||
$.on @el, 'click', @cb
|
$.on @el, 'click', @cb
|
||||||
true
|
true
|
||||||
|
|
||||||
|
return unless g.VIEW in ['index', 'thread']
|
||||||
|
|
||||||
Callbacks.Post.push
|
Callbacks.Post.push
|
||||||
name: 'Thread Watcher'
|
name: 'Thread Watcher'
|
||||||
cb: @node
|
cb: @node
|
||||||
|
|||||||
@ -10,7 +10,7 @@ QuoteYou =
|
|||||||
{boardID, threadID, postID} = e.detail
|
{boardID, threadID, postID} = e.detail
|
||||||
(QuoteYou.db.set {boardID, threadID, postID, val: true})
|
(QuoteYou.db.set {boardID, threadID, postID, val: true})
|
||||||
|
|
||||||
return unless g.VIEW in ['index', 'thread']
|
return unless g.VIEW in ['index', 'thread', 'archive']
|
||||||
|
|
||||||
if Conf['Highlight Own Posts']
|
if Conf['Highlight Own Posts']
|
||||||
$.addClass doc, 'highlight-own'
|
$.addClass doc, 'highlight-own'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user