ÿØÿà JFIF H H ÿÛ C GIF89;
| System: Linux server378.web-hosting.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64 Current Path : /opt/alt/alt-nodejs12/root/usr/lib/node_modules/npm/docs/src/components/ |
| Current File : //opt/alt/alt-nodejs12/root/usr/lib/node_modules/npm/docs/src/components/scripts.js |
import React from 'react'
const IS_STATIC = process.env.GATSBY_IS_STATIC
const Scripts = () => {
// Workaround: Make links work on the static html site
if (IS_STATIC) {
return (
<script
dangerouslySetInnerHTML={{
__html: `
var anchors = document.querySelectorAll(".sidebar a, .documentation a")
Array.prototype.slice.call(anchors).map(function(el) {
if (el.href.match(/file:\\/\\//)) {
el.href = el.href + "/index.html"
}
})
`
}}
/>
)
}
return null
}
export default Scripts