CodingDocs / CodingDocs/springboot-guide

似乎有一些图片挂了,临时解决办法

Đang mở
#48 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
5.3k
Fork
1.4k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

看起来是csdn图床加了防盗链处理,解决方法是在img标签上加个`referrerPolicy="no-referrer"`或者是在html里加个` `
这里写了一个油猴脚本
```
// ==UserScript==
// @name 恢复图片显示
// @namespace http://tampermonkey.net/
// @version 2024-03-26
// @description try to take over the world!
// @author You
// @match https://snailclimb.gitee.io/springboot-guide/
// @icon https://www.google.com/s2/favicons?sz=64&domain=gitee.io
// @grant none
// ==/UserScript==

(function() {
'use strict';
setTimeout(() => {
// 获取页面上的所有img标签
var imgElements = document.getElementsByTagName('img');

// 遍历所有img标签并添加referrerPolicy属性
for (var i = 0; i < imgElements.length; i++) {
imgElements[i].setAttribute('referrerPolicy', 'no-referrer');
}
}, 2000)

// Your code here...
})();
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.