feat: idownloadblog optimization (#4667)
This commit is contained in:
parent
4c33e3ebe8
commit
451b05a654
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue