add no-referrer for pixiv img

This commit is contained in:
DIYgod 2018-04-20 18:33:38 +08:00
parent b83abdb32c
commit 9beb2013cf
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
1 changed files with 2 additions and 2 deletions

View File

@ -136,10 +136,10 @@ module.exports = async (ctx) => {
item: illusts.map((illust) => {
const images = [];
if (illust.page_count === 1) {
images.push(`<p><img src="https://pixiv.cat/${illust.id}.jpg"/></p>`);
images.push(`<p><img referrerpolicy="no-referrer" src="https://pixiv.cat/${illust.id}.jpg"/></p>`);
} else {
for (let i = 0; i < illust.page_count; i++) {
images.push(`<p><img src="https://pixiv.cat/${illust.id}-${i+1}.jpg"/></p>`);
images.push(`<p><img referrerpolicy="no-referrer" src="https://pixiv.cat/${illust.id}-${i+1}.jpg"/></p>`);
}
}
return {