mirror of https://gitlab.com/octtspacc/sitoctt
16 lines
309 B
JavaScript
16 lines
309 B
JavaScript
(function(){
|
|
|
|
if (location.protocol !== 'file:') {
|
|
return;
|
|
}
|
|
|
|
window.addEventListener('load', (function(){
|
|
Array.from(document.querySelectorAll('a[href]')).forEach(function(linkEl){
|
|
if (linkEl.href.startsWith('file://') && linkEl.href.endsWith('/')) {
|
|
linkEl.href += 'index.html';
|
|
}
|
|
});
|
|
}));
|
|
|
|
})();
|