mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 06:30:40 +08:00
feat: csm img add referrerpolicy="no-referrer" (#2564)
* enhance: csm img add referrerpolicy="no-referrer" fix #2563 * close #2494 * Update csm.js
This commit is contained in:
@@ -19,8 +19,8 @@ RSSHub is a lightweight and extensible RSS feed aggregator, it's able to generat
|
|||||||
|
|
||||||
### Sponsors
|
### Sponsors
|
||||||
|
|
||||||
| [Eternal Proxy](https://proxy.eternalstudio.cn/?from=rsshub) | [Liuyang](https://github.com/lingllting) | [Sayori Studio](https://t.me/SayoriStudio) | 匿名 | [Sion Kazama](https://blog.sion.moe) |
|
| [Eternal Proxy](https://proxy.eternalstudio.cn/?from=rsshub) | [Liuyang](https://github.com/lingllting) | [Sayori Studio](https://t.me/SayoriStudio) | Anonymous | [Sion Kazama](https://blog.sion.moe) |
|
||||||
| :----------------------------------------------------------: | :--------------------------------------: | :----------------------------------------: | :--: | :----------------------------------: |
|
| :----------------------------------------------------------: | :--------------------------------------: | :----------------------------------------: | :-------: | :----------------------------------: |
|
||||||
|
|
||||||
|
|
||||||
[](/support/)
|
[](/support/)
|
||||||
@@ -55,7 +55,7 @@ Logo designed by [sheldonrrr](https://dribbble.com/sheldonrrr)
|
|||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
|
|
||||||
Free feel to test the [demo instance](https://rsshub.app), the cache expiry time is set to 10 minutes.
|
Feel free to test the [demo instance](https://rsshub.app), the cache expiry time is set to 10 minutes.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,12 @@ module.exports = async (ctx) => {
|
|||||||
const article = cheerio.load(response);
|
const article = cheerio.load(response);
|
||||||
|
|
||||||
article('[style="display: none;"], [style=" display: none;"], [style="display: none"]').each((i, e) => {
|
article('[style="display: none;"], [style=" display: none;"], [style="display: none"]').each((i, e) => {
|
||||||
$(e).remove();
|
article(e).remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
article('#js_content img').each((index, elem) => {
|
||||||
|
const $elem = article(elem);
|
||||||
|
$elem.attr('referrerpolicy', 'no-referrer');
|
||||||
});
|
});
|
||||||
|
|
||||||
const single = {
|
const single = {
|
||||||
|
|||||||
Reference in New Issue
Block a user