diff --git a/src/General/lib/clone.class b/src/General/lib/clone.class index f0c42ecbf..288580e1f 100755 --- a/src/General/lib/clone.class +++ b/src/General/lib/clone.class @@ -58,6 +58,7 @@ class Clone extends Post @file[key] = val file = $ '.file', post @file.text = file.firstElementChild + @file.link = $ '.fileText > a, .original-file-info > a', file @file.thumb = $ '.fileThumb > [data-md5]', file @file.fullImage = $ '.full-image', file @file.videoControls = $ '.video-controls', @file.text diff --git a/src/General/lib/post.class b/src/General/lib/post.class index 5932cc30e..62fe25bff 100755 --- a/src/General/lib/post.class +++ b/src/General/lib/post.class @@ -164,7 +164,7 @@ class Post parseFile: -> return unless fileEl = $ '.file', @nodes.post - return unless link = $ '.fileText > a', fileEl + return unless link = $ '.fileText > a, .original-file-info > a', fileEl return unless info = link.nextSibling?.textContent.match /\(([\d.]+ [KMG]?B).*\)/ fileText = fileEl.firstElementChild @file = @@ -180,7 +180,7 @@ class Post unit = ['B', 'KB', 'MB', 'GB'].indexOf @file.size.match(/\w+$/)[0] size *= 1024 while unit-- > 0 @file.sizeInBytes = size - if (thumb = $ 'img[data-md5]', fileEl) + if (thumb = $ '.fileThumb > [data-md5]', fileEl) $.extend @file, thumb: thumb thumbURL: "#{location.protocol}//i.4cdn.org/#{@board}/#{link.href.match(/(\d+)\./)[1]}s.jpg"