diff --git a/docs/extra/image.js b/docs/extra/image.js new file mode 100644 index 0000000..d64ffc2 --- /dev/null +++ b/docs/extra/image.js @@ -0,0 +1,5 @@ +const images = document.querySelectorAll('img'); + +for (const image of images) { + image.setAttribute('referrerpolicy', 'no-referrer'); +} diff --git a/mkdocs.yml b/mkdocs.yml index 4098503..9842fc6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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 \ No newline at end of file