Choose a thumbnail from the photos of the post without thumbnail and banner
Signed-off-by: Xiaofeng QU <xiaofeng.qu.hk@ieee.org>pull/27/head
parent
e7a195e442
commit
9ca2ed1133
|
@ -6,6 +6,8 @@
|
||||||
s = post.thumbnail;
|
s = post.thumbnail;
|
||||||
}else if (post.banner){
|
}else if (post.banner){
|
||||||
s = post.banner;
|
s = post.banner;
|
||||||
|
}else if (post.photos && post.photos.length){
|
||||||
|
s = post.photos[0];
|
||||||
}else{
|
}else{
|
||||||
var img=/\<img\s.*?\s?src\s*=\s*['|"]?([^\s'"]+).*?\>/ig;
|
var img=/\<img\s.*?\s?src\s*=\s*['|"]?([^\s'"]+).*?\>/ig;
|
||||||
var result = post.content.match(img);
|
var result = post.content.match(img);
|
||||||
|
|
Loading…
Reference in New Issue