Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
fix: use thumbnail url from <img> src
Browse files Browse the repository at this point in the history
  • Loading branch information
ppoffice committed Jul 7, 2016
1 parent d85f7e0 commit 70416a5
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions scripts/thumbnail.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,6 @@ hexo.extend.helper.register('thumbnail', function (post) {
if (result && result.length > 1) {
url = result[1];
}
if(url.length > 0) {
var pattern = /^[\\{0,1}\/{0,1}]([^\/^\\]+)/,
pattern_ = /([^\/^\\]+)/;
if ((ret = pattern.exec(url)) != null) {
if(ret[0].length == url.length) {
url = post.path + ret[1];
}
} else if ((ret = pattern_.exec(url)) != null) {
if(ret[0].length == url.length) {
url = post.path + ret[1];
}
}
}
}
return url;
});

0 comments on commit 70416a5

Please sign in to comment.