Make documentation links shorter to make the table less wide

This commit is contained in:
Hugo Locurcio
2020-03-23 22:31:29 +01:00
parent b0edb6ee83
commit e45c2efc85

View File

@@ -25,7 +25,14 @@
} else {
td.style.backgroundColor = `hsla(0, 100%, 50%, ${0.334 - percentage / 300.0})`
}
})
});
document.querySelectorAll('td:last-child').forEach(td => {
const docLink = td.querySelector('a');
// Only keep the last fragment and trim the file extension to make the table less wide.
const docLinkSplit = docLink.innerText.split('/');
docLink.innerText = docLinkSplit[docLinkSplit.length - 1].slice(0, -5);
});
</script>
</body>
</html>