Skip to content

Commit

Permalink
Merge pull request #31 from yixiaojiu/image
Browse files Browse the repository at this point in the history
fix: image cors
  • Loading branch information
theanarkh committed May 22, 2024
2 parents f356d83 + 0755993 commit 58620a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/extra/image.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const images = document.querySelectorAll('img');

for (const image of images) {
image.setAttribute('referrerpolicy', 'no-referrer');
}
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,6 @@ nav:
- 28-Node.js底层原理(架构篇): chapter28-Node.js底层原理(架构篇).md
- 29-Node.js底层原理(实现篇): chapter29-Node.js底层原理(实现篇).md

extra_javascript:
- path: extra/image.js
defer: true

0 comments on commit 58620a2

Please sign in to comment.