Don't crash if link (which could be from archive) is not a 4chan filename.
This commit is contained in:
parent
9c795c95b2
commit
c1f62d1612
@ -183,7 +183,7 @@ class Post
|
||||
if (thumb = $ '.fileThumb > [data-md5]', fileEl)
|
||||
$.extend @file,
|
||||
thumb: thumb
|
||||
thumbURL: "#{location.protocol}//i.4cdn.org/#{@board}/#{link.href.match(/(\d+)\./)[1]}s.jpg"
|
||||
thumbURL: if m = link.href.match(/\d+(?=\.\w+$)/) then "#{location.protocol}//i.4cdn.org/#{@board}/#{m[0]}s.jpg"
|
||||
MD5: thumb.dataset.md5
|
||||
isSpoiler: $.hasClass thumb.parentNode, 'imgspoiler'
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user