diff --git a/4chan_x.user.js b/4chan_x.user.js
index 955f028f8..736fc6444 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -3141,7 +3141,7 @@
}
},
parseArchivedPost: function(req, board, postID, root, cb) {
- var bq, br, capcode, data, email, file, filename, filesize, isOP, max, name, nameBlock, pc, pi, piM, span, subject, threadID, timestamp, trip;
+ var bq, br, capcode, data, email, file, filename, filesize, isOP, max, name, nameBlock, pc, pi, piM, span, subject, threadID, thumb_src, timestamp, trip;
data = JSON.parse(req.response);
$.addClass(root, 'archivedPost');
if (data.error) {
@@ -3280,11 +3280,12 @@
span.title = filename;
max = isOP ? 40 : 30;
span.textContent = filename.replace(/\.\w+$/, '').length > max ? "" + filename.slice(0, max) + "(...)" + (filename.match(/\.\w+$/)) : filename;
+ thumb_src = data.media_status === 'available' ? "src=" + data.thumb_link : '';
$.add(file, $.el('a', {
className: 'fileThumb',
href: data.media_link || data.remote_media_link,
target: '_blank',
- innerHTML: "
"
+ innerHTML: "
"
}));
$.after((isOP ? piM : pi), file);
}
diff --git a/script.coffee b/script.coffee
index ded82224a..31a202c1f 100644
--- a/script.coffee
+++ b/script.coffee
@@ -2568,11 +2568,12 @@ Get =
"#{filename[...max]}(...)#{filename.match(/\.\w+$/)}"
else
filename
+ thumb_src = if data.media_status is 'available' then "src=#{data.thumb_link}" else ''
$.add file, $.el 'a',
className: 'fileThumb'
href: data.media_link or data.remote_media_link
target: '_blank'
- innerHTML: "
"
+ innerHTML: "
"
$.after (if isOP then piM else pi), file
$.replace root.firstChild, pc