Image Hover in Catalog
This commit is contained in:
parent
a0e1268e60
commit
a94dd0c71f
@ -159,6 +159,10 @@ Config =
|
||||
true
|
||||
'Show full image / video on mouseover.'
|
||||
]
|
||||
'Image Hover in Catalog': [
|
||||
false
|
||||
'Show full image / video on mouseover in 4chan X catalog.'
|
||||
]
|
||||
'Gallery': [
|
||||
true
|
||||
'Adds a simple and cute image gallery.'
|
||||
|
||||
@ -1,13 +1,21 @@
|
||||
ImageHover =
|
||||
init: ->
|
||||
return if g.VIEW is 'catalog' or !Conf['Image Hover']
|
||||
|
||||
Post.callbacks.push
|
||||
name: 'Image Hover'
|
||||
cb: @node
|
||||
return if g.VIEW is 'catalog'
|
||||
if Conf['Image Hover']
|
||||
Post.callbacks.push
|
||||
name: 'Image Hover'
|
||||
cb: @node
|
||||
if Conf['Image Hover in Catalog']
|
||||
CatalogThread.callbacks.push
|
||||
name: 'Catalog Image Hover'
|
||||
cb: @catalogNode
|
||||
node: ->
|
||||
return unless @file?.isImage or @file?.isVideo
|
||||
return unless @file and (@file.isImage or @file.isVideo)
|
||||
$.on @file.thumb, 'mouseover', ImageHover.mouseover @
|
||||
catalogNode: ->
|
||||
{file} = @thread.OP
|
||||
return unless file and (file.isImage or file.isVideo)
|
||||
$.on @nodes.thumb, 'mouseover', ImageHover.mouseover @thread.OP
|
||||
mouseover: (post) -> (e) ->
|
||||
return unless doc.contains @
|
||||
{file} = post
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user