Clear event listener

Conflicts:
	builds/4chan-X-beta.user.js
	builds/4chan-X.user.js
This commit is contained in:
Zixaphir 2014-04-07 10:49:11 -07:00 committed by ccd0
parent 4ed1e1fe7a
commit 5bf9e0ab8b

View File

@ -50,13 +50,15 @@ ImageLoader =
file.autoplay = Conf['Autoplay']
if Conf['Image Hover']
$.on file, 'mouseover', ImageHover.mouseover
$.on file, 'load loadedmetadata', =>
cb = =>
$.off file, 'load loadedmetadata', cb
# Replace the thumbnail once the file has finished loading.
if isVideo
$.replace thumb, file
@file.thumb = file # XXX expanding requires the post.file.thumb node.
return
thumb.src = URL
$.on file, 'load loadedmetadata', cb
file.src = URL
toggle: ->