feat: idownloadblog optimization (#4667)
This commit is contained in:
@@ -11,7 +11,12 @@ module.exports = async (ctx) => {
|
||||
const content = $('div.post-content');
|
||||
|
||||
content.find('.lazy-hidden').each((i, e) => {
|
||||
$(e).attr('src', $(e).attr('data-src'));
|
||||
$(`<img src=${$(e).attr('data-src')}>`).insertBefore(e);
|
||||
$(e).remove();
|
||||
});
|
||||
|
||||
content.find('.code-block, noscript').each((i, e) => {
|
||||
$(e).remove();
|
||||
});
|
||||
|
||||
return content.html();
|
||||
|
||||
Reference in New Issue
Block a user