From 6b9059182fdf97001f013efc57150ff3dc14d80a Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 18 Jul 2015 11:23:26 -0700 Subject: [PATCH] Revert "Suppress post thumbnails from loading until they are actually inserted into the index." This reverts commit 6ad0064f415f0d97c7b6ddaadb2f5f476de2ac8a. Conflicts: src/General/Build.coffee src/General/html/Build/File.html src/Images/ImageLoader.coffee --- src/General/Build.coffee | 9 ++++----- src/General/Index.coffee | 4 ---- src/General/html/Build/File.html | 4 ++-- src/General/lib/clone.class | 5 ----- src/Images/ImageLoader.coffee | 6 ++---- src/Images/RevealSpoilers.coffee | 5 +---- 6 files changed, 9 insertions(+), 24 deletions(-) diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 0b76f84e1..1854fd9bd 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -88,11 +88,10 @@ Build = .replace(/<[^>]*>/g, '') o.info.comment = Build.unescape html - postFromObject: (data, boardID, suppressThumb) -> - o = Build.parseJSON data, boardID - Build.post o, suppressThumb + postFromObject: (data, boardID) -> + Build.post Build.parseJSON data, boardID - post: (o, suppressThumb) -> + post: (o) -> {postID, threadID, boardID, file} = o {subject, email, name, tripcode, capcode, uniqueID, flagCode, flag, dateUTC, dateText, commentHTML} = o.info {staticPath, gifIcon} = Build @@ -178,7 +177,7 @@ Build = root excerptThread: (board, data, OP) -> - nodes = [if OP then OP.nodes.root else Build.postFromObject data, board.ID, true] + nodes = [if OP then OP.nodes.root else Build.postFromObject data, board.ID] if data.omitted_posts or !Conf['Show Replies'] and data.replies [posts, files] = if Conf['Show Replies'] # XXX data.omitted_images is not accurate. diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 74a4dfaab..88b47d7ed 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -650,10 +650,6 @@ Index = buildStructure: (nodes) -> for node in nodes - if thumb = $ 'img[data-src]', node - thumb.src = thumb.dataset.src - # XXX https://bugzilla.mozilla.org/show_bug.cgi?id=1021289 - thumb.removeAttribute 'data-src' $.add Index.root, [node, $.el 'hr'] $.event 'PostsInserted' if doc.contains Index.root ThreadHiding.onIndexBuild nodes diff --git a/src/General/html/Build/File.html b/src/General/html/Build/File.html index d48f11db2..5d3014a24 100644 --- a/src/General/html/Build/File.html +++ b/src/General/html/Build/File.html @@ -15,8 +15,8 @@ (${file.size}, ${file.dimensions || "PDF"}) - ${file.size} doc.contains clone.nodes.root file.isPrefetched = true @@ -72,8 +72,6 @@ ImageLoader = $.on el, 'load', -> clone.file.thumb.src = url for clone in post.clones thumb.src = url - # XXX https://bugzilla.mozilla.org/show_bug.cgi?id=1021289 - thumb.removeAttribute 'data-src' el.src = url toggle: -> diff --git a/src/Images/RevealSpoilers.coffee b/src/Images/RevealSpoilers.coffee index ed159a4ca..4c3e65709 100755 --- a/src/Images/RevealSpoilers.coffee +++ b/src/Images/RevealSpoilers.coffee @@ -13,7 +13,4 @@ RevealSpoilers = thumb.removeAttribute 'style' # Enforce thumbnail size if thumbnail is replaced. thumb.style.maxHeight = thumb.style.maxWidth = if @isReply then '125px' else '250px' - if thumb.src - thumb.src = @file.thumbURL - else - thumb.dataset.src = @file.thumbURL + thumb.src = @file.thumbURL