feat: use item link as absolute link base
This commit is contained in:
parent
56566ef62d
commit
84fdea3d1e
|
|
@ -46,7 +46,7 @@ module.exports = async (ctx, next) => {
|
|||
|
||||
// absolute link
|
||||
if (ctx.state.data.link) {
|
||||
$ele.attr('href', new URL($ele.attr('href'), ctx.state.data.link).href);
|
||||
$ele.attr('href', new URL($ele.attr('href'), item.link || ctx.state.data.link).href);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ module.exports = async (ctx, next) => {
|
|||
|
||||
// absolute link
|
||||
if (ctx.state.data.link) {
|
||||
$ele.attr('src', new URL($ele.attr('src'), ctx.state.data.link).href);
|
||||
$ele.attr('src', new URL($ele.attr('src'), item.link || ctx.state.data.link).href);
|
||||
}
|
||||
|
||||
// referrerpolicy
|
||||
|
|
|
|||
Loading…
Reference in New Issue