Multifile support for ImageCommon.cache. #2171
This commit is contained in:
parent
b588ca43fd
commit
829ef77159
@ -168,14 +168,14 @@ ImageExpand =
|
||||
|
||||
if file.fullImage
|
||||
el = file.fullImage
|
||||
else if ImageCommon.cache?.dataset.fullID is post.fullID
|
||||
else if ImageCommon.cache?.dataset.fileID is "#{post.fullID}.#{file.index}"
|
||||
el = file.fullImage = ImageCommon.popCache()
|
||||
$.on el, 'error', ImageExpand.error
|
||||
ImageCommon.rewind el if Conf['Restart when Opened'] and el.id isnt 'ihover'
|
||||
el.removeAttribute 'id'
|
||||
else
|
||||
el = file.fullImage = $.el (if isVideo then 'video' else 'img')
|
||||
el.dataset.fullID = post.fullID
|
||||
el.dataset.fileID = "#{post.fullID}.#{file.index}"
|
||||
$.on el, 'error', ImageExpand.error
|
||||
el.src = src or file.url
|
||||
|
||||
|
||||
@ -24,12 +24,12 @@ ImageHover =
|
||||
{isVideo} = file
|
||||
return if file.isExpanding or file.isExpanded or g.SITE.isThumbExpanded?(file)
|
||||
error = ImageHover.error post, file
|
||||
if ImageCommon.cache?.dataset.fullID is post.fullID
|
||||
if ImageCommon.cache?.dataset.fileID is "#{post.fullID}.#{file.index}"
|
||||
el = ImageCommon.popCache()
|
||||
$.on el, 'error', error
|
||||
else
|
||||
el = $.el (if isVideo then 'video' else 'img')
|
||||
el.dataset.fullID = post.fullID
|
||||
el.dataset.fileID = "#{post.fullID}.#{file.index}"
|
||||
$.on el, 'error', error
|
||||
el.src = file.url
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user