Clear event listener
Conflicts: builds/4chan-X-beta.user.js builds/4chan-X.user.js
This commit is contained in:
parent
4ed1e1fe7a
commit
5bf9e0ab8b
@ -50,13 +50,15 @@ ImageLoader =
|
|||||||
file.autoplay = Conf['Autoplay']
|
file.autoplay = Conf['Autoplay']
|
||||||
if Conf['Image Hover']
|
if Conf['Image Hover']
|
||||||
$.on file, 'mouseover', ImageHover.mouseover
|
$.on file, 'mouseover', ImageHover.mouseover
|
||||||
$.on file, 'load loadedmetadata', =>
|
cb = =>
|
||||||
|
$.off file, 'load loadedmetadata', cb
|
||||||
# Replace the thumbnail once the file has finished loading.
|
# Replace the thumbnail once the file has finished loading.
|
||||||
if isVideo
|
if isVideo
|
||||||
$.replace thumb, file
|
$.replace thumb, file
|
||||||
@file.thumb = file # XXX expanding requires the post.file.thumb node.
|
@file.thumb = file # XXX expanding requires the post.file.thumb node.
|
||||||
return
|
return
|
||||||
thumb.src = URL
|
thumb.src = URL
|
||||||
|
$.on file, 'load loadedmetadata', cb
|
||||||
file.src = URL
|
file.src = URL
|
||||||
|
|
||||||
toggle: ->
|
toggle: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user