mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-19 06:38:55 +08:00
feat: remove referrerpolicy in routes
This commit is contained in:
@@ -6,12 +6,9 @@ const ProcessImage = ($, e, c) => {
|
||||
|
||||
// handle cover image and lazy-loading images
|
||||
if (img[0].attribs.src) {
|
||||
message = `<figure><img referrerpolicy="no-referrer" alt='${img[0].attribs.alt ? img[0].attribs.alt : ''}' src='${img[0].attribs.src.replace(/(?<=\/news\/).*?(?=\/cpsprodpb)/, '600')}'><br><figcaption>`;
|
||||
message = `<figure><img alt='${img[0].attribs.alt ? img[0].attribs.alt : ''}' src='${img[0].attribs.src.replace(/(?<=\/news\/).*?(?=\/cpsprodpb)/, '600')}'><br><figcaption>`;
|
||||
} else {
|
||||
message = `<figure><img referrerpolicy="no-referrer" alt='${img[0].attribs['data-alt'] ? img[0].attribs['data-alt'] : ''}' src='${img[0].attribs['data-src'].replace(
|
||||
/(?<=\/news\/).*?(?=\/cpsprodpb)/,
|
||||
'600'
|
||||
)}'><br><figcaption>`;
|
||||
message = `<figure><img alt='${img[0].attribs['data-alt'] ? img[0].attribs['data-alt'] : ''}' src='${img[0].attribs['data-src'].replace(/(?<=\/news\/).*?(?=\/cpsprodpb)/, '600')}'><br><figcaption>`;
|
||||
}
|
||||
|
||||
// add image caption
|
||||
@@ -97,7 +94,7 @@ const ProcessFeed = ($, link) => {
|
||||
|
||||
if (cover.length > 0) {
|
||||
// there is a cover image
|
||||
message = `<br><img referrerpolicy="no-referrer" src='${cover[0].attribs.src}'>` + message;
|
||||
message = `<br><img src='${cover[0].attribs.src}'>` + message;
|
||||
}
|
||||
|
||||
$(message).insertAfter(content[0].lastChild);
|
||||
|
||||
Reference in New Issue
Block a user