diff --git a/CHANGELOG.md b/CHANGELOG.md index 3937d8580..819e92a4a 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +**ccd0** +- Fix conflict of previous version with Exlinks. + ### v1.7.11 *2014-04-19* diff --git a/src/General/lib/post.class b/src/General/lib/post.class index 81b0797bb..706984be9 100755 --- a/src/General/lib/post.class +++ b/src/General/lib/post.class @@ -130,7 +130,9 @@ class Post thumb.src else "#{location.protocol}//t.4cdn.org/#{@board}/thumb/#{@file.URL.match(/(\d+)\./)[1]}s.jpg" - @file.name = fileText.title or fileText.lastElementChild.title or fileText.lastElementChild.textContent + @file.name = fileText.title or do -> + nameNode = $('span', fileText) or $('a', fileText) + nameNode.title or nameNode.textContent <% if (type === 'crx') { %> # replace %22 with quotes, see: # crbug.com/81193 @@ -139,8 +141,8 @@ class Post # http://www.whatwg.org/specs/web-apps/current-work/#multipart-form-data @file.name = @file.name.replace /%22/g, '"' <% } %> - @file.isImage = /(jpg|png|gif)$/i.test @file.name - @file.isVideo = /webm$/i.test @file.name + @file.isImage = /(jpg|png|gif)$/i.test @file.URL + @file.isVideo = /webm$/i.test @file.URL if @file.isImage or @file.isVideo @file.dimensions = fileText.textContent.match(/\d+x\d+/)[0]