gitnet-assets/main.js

20 lines
502 B
JavaScript
Raw Normal View History

2022-04-11 15:17:08 +02:00
const replaceLinks = () => {
const links = document.querySelectorAll('.download a')
for (let link of links) {
let href = link.getAttribute('href')
if (link.classList.contains('archive-link')) {
href = 'https://dl.gitnet.fr' + href
} else {
href = href.replace('https://gitnet.fr', 'https://dl.gitnet.fr')
}
link.setAttribute('href', href)
}
}
document.addEventListener("DOMContentLoaded", () => {
2022-04-11 15:20:27 +02:00
// replaceLinks()
2022-04-11 15:17:08 +02:00
})