Only open directories automatically
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simon Bruder 2020-07-20 12:14:37 +02:00
parent 0bbbd68dbe
commit 6825b9e5aa
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F

View file

@ -67,7 +67,10 @@ document.addEventListener('DOMContentLoaded', () => {
const visibleRows = rows.filter(row => row.style.display === 'table-row')
if (visibleRows.length === 1) {
window.location = visibleRows[0].querySelector('td a').href
const target = visibleRows[0].querySelector('td a').href
if (target.substr(-1) === '/') {
window.location = target
}
}
})
})