Skip to content

Instantly share code, notes, and snippets.

@farinspace
Created June 10, 2018 22:14
Show Gist options
  • Save farinspace/74c6a3442372c07b1aeccebcb74510ae to your computer and use it in GitHub Desktop.
Save farinspace/74c6a3442372c07b1aeccebcb74510ae to your computer and use it in GitHub Desktop.
Remove time from Apache directory listings
<IfModule mod_autoindex.c>
IndexHeadInsert "<script>window.onload=function(){document.querySelectorAll('tr td:nth-child(3)').forEach(function(td){if(td&&td.innerText.indexOf('-')>=0)td.innerHTML=td.innerText.match(/\d{4}-\d{2}-\d{2}/)[0]})}</script>"
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment