Merge pull request #27 from quxiaofeng/master
Choose a thumbnail from the photos of the post without a thumbnail nor a bannerpull/30/head
commit
1a6dd11401
|
@ -6,6 +6,8 @@
|
|||
s = post.thumbnail;
|
||||
}else if (post.banner){
|
||||
s = post.banner;
|
||||
}else if (post.photos && post.photos.length){
|
||||
s = post.photos[0];
|
||||
}else{
|
||||
var img=/\<img\s.*?\s?src\s*=\s*['|"]?([^\s'"]+).*?\>/ig;
|
||||
var result = post.content.match(img);
|
||||
|
|
Loading…
Reference in New Issue