Remove deferred thumbnail loading; no longer needed.
This commit is contained in:
parent
293fca67dd
commit
59bc4143db
@ -95,11 +95,11 @@ Build =
|
|||||||
# Remove preceding and following new lines, trailing spaces.
|
# Remove preceding and following new lines, trailing spaces.
|
||||||
Build.parseComment(html).trim().replace(/\s+$/gm, '')
|
Build.parseComment(html).trim().replace(/\s+$/gm, '')
|
||||||
|
|
||||||
postFromObject: (data, boardID, suppressThumb) ->
|
postFromObject: (data, boardID) ->
|
||||||
o = Build.parseJSON data, boardID
|
o = Build.parseJSON data, boardID
|
||||||
Build.post o, suppressThumb
|
Build.post o
|
||||||
|
|
||||||
post: (o, suppressThumb) ->
|
post: (o) ->
|
||||||
{ID, threadID, boardID, file} = o
|
{ID, threadID, boardID, file} = o
|
||||||
{subject, email, name, tripcode, capcode, uniqueID, flagCode, flag, dateUTC, dateText, commentHTML} = o.info
|
{subject, email, name, tripcode, capcode, uniqueID, flagCode, flag, dateUTC, dateText, commentHTML} = o.info
|
||||||
{staticPath, gifIcon} = Build
|
{staticPath, gifIcon} = Build
|
||||||
|
|||||||
@ -15,8 +15,8 @@
|
|||||||
(${file.size}, ${file.dimensions || "PDF"})
|
(${file.size}, ${file.dimensions || "PDF"})
|
||||||
</div>
|
</div>
|
||||||
<a class="fileThumb?{file.isSpoiler}{ imgspoiler}{}" href="${fileURL}" target="_blank">
|
<a class="fileThumb?{file.isSpoiler}{ imgspoiler}{}" href="${fileURL}" target="_blank">
|
||||||
<img
|
<img
|
||||||
?{suppressThumb}{ data-src="${fileThumb}"}{ src="${fileThumb}"}
|
src="${fileThumb}"
|
||||||
alt="${file.size}"
|
alt="${file.size}"
|
||||||
data-md5="${file.MD5}"
|
data-md5="${file.MD5}"
|
||||||
style="height: ${file.isSpoiler ? 100 : file.theight}px; width: ${file.isSpoiler ? 100 : file.twidth}px;"
|
style="height: ${file.isSpoiler ? 100 : file.theight}px; width: ${file.isSpoiler ? 100 : file.twidth}px;"
|
||||||
|
|||||||
@ -632,7 +632,7 @@ Index =
|
|||||||
|
|
||||||
if not ((OP = thread.OP) and not OP.isFetchedQuote)
|
if not ((OP = thread.OP) and not OP.isFetchedQuote)
|
||||||
obj = Index.parsedThreads[ID]
|
obj = Index.parsedThreads[ID]
|
||||||
OP = new Post Build.post(obj, true), thread, g.BOARD
|
OP = new Post Build.post(obj), thread, g.BOARD
|
||||||
OP.filterResults = obj.filterResults
|
OP.filterResults = obj.filterResults
|
||||||
newPosts.push OP
|
newPosts.push OP
|
||||||
thread.setPage(Index.threadPosition[ID] // Index.threadsNumPerPage + 1)
|
thread.setPage(Index.threadPosition[ID] // Index.threadsNumPerPage + 1)
|
||||||
@ -789,10 +789,6 @@ Index =
|
|||||||
$.replace thread.nodes.placeholder, thread.OP.nodes.root
|
$.replace thread.nodes.placeholder, thread.OP.nodes.root
|
||||||
thread.nodes.placeholder = null
|
thread.nodes.placeholder = null
|
||||||
thread.OP.setCatalogOP false
|
thread.OP.setCatalogOP false
|
||||||
if (file = thread.OP.file) and (thumb = thread.OP.file.thumb) and thumb.dataset.src
|
|
||||||
thumb.src = thumb.dataset.src
|
|
||||||
# XXX https://bugzilla.mozilla.org/show_bug.cgi?id=1021289
|
|
||||||
thumb.removeAttribute 'data-src'
|
|
||||||
nodes.push thread.nodes.root, $.el('hr')
|
nodes.push thread.nodes.root, $.el('hr')
|
||||||
$.add Index.root, nodes
|
$.add Index.root, nodes
|
||||||
if doc.contains Index.root
|
if doc.contains Index.root
|
||||||
|
|||||||
@ -123,10 +123,6 @@ Gallery =
|
|||||||
|
|
||||||
thumbImg = post.file.thumb.cloneNode false
|
thumbImg = post.file.thumb.cloneNode false
|
||||||
thumbImg.style.cssText = ''
|
thumbImg.style.cssText = ''
|
||||||
if thumbImg.dataset.src
|
|
||||||
thumbImg.src = thumbImg.dataset.src
|
|
||||||
# XXX https://bugzilla.mozilla.org/show_bug.cgi?id=1021289
|
|
||||||
thumbImg.removeAttribute 'data-src'
|
|
||||||
$.add thumb, thumbImg
|
$.add thumb, thumbImg
|
||||||
|
|
||||||
$.on thumb, 'click', Gallery.cb.open
|
$.on thumb, 'click', Gallery.cb.open
|
||||||
|
|||||||
@ -73,8 +73,6 @@ ImageLoader =
|
|||||||
$.on el, 'load', ->
|
$.on el, 'load', ->
|
||||||
clone.file.thumb.src = url for clone in post.clones
|
clone.file.thumb.src = url for clone in post.clones
|
||||||
thumb.src = url
|
thumb.src = url
|
||||||
# XXX https://bugzilla.mozilla.org/show_bug.cgi?id=1021289
|
|
||||||
thumb.removeAttribute 'data-src'
|
|
||||||
el.src = url
|
el.src = url
|
||||||
|
|
||||||
toggle: ->
|
toggle: ->
|
||||||
|
|||||||
@ -54,11 +54,6 @@ Post.Clone = class extends Post
|
|||||||
|
|
||||||
@file.thumb.muted = true if @file.videoThumb
|
@file.thumb.muted = true if @file.videoThumb
|
||||||
|
|
||||||
if @file.thumb?.dataset.src
|
|
||||||
@file.thumb.src = @file.thumb.dataset.src
|
|
||||||
# XXX https://bugzilla.mozilla.org/show_bug.cgi?id=1021289
|
|
||||||
@file.thumb.removeAttribute 'data-src'
|
|
||||||
|
|
||||||
# Contract thumbnails in quote preview
|
# Contract thumbnails in quote preview
|
||||||
ImageExpand.contract @ if @file.thumb and contractThumb
|
ImageExpand.contract @ if @file.thumb and contractThumb
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user