nginx-interactive-index: Only apply stripes to body

upower
Simon Bruder 2021-08-29 14:13:35 +02:00
parent f6d9bf82db
commit 77eab2497a
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
1 changed files with 2 additions and 2 deletions

View File

@ -39,13 +39,13 @@ document.addEventListener('DOMContentLoaded', () => {
const collator = new Intl.Collator('kn', {numeric: true})
// transform plain text to table
document.querySelector('pre').outerHTML = '<table><tr><th>Name</th><th>Size</th></tr><tr><td><a href="..">..</a></td><td>-</td></tr>' + document.querySelector('pre').innerHTML
document.querySelector('pre').outerHTML = '<table><thead><tr><th>Name</th><th>Size</th></tr></thead><tbody><tr><td><a href="..">..</a></td><td>-</td></tr>' + document.querySelector('pre').innerHTML
.split('\n')
.filter(line => line !== '')
.filter(line => line !== '<a href="../">../</a>')
.map(processLine)
.sort(collator.compare)
.join('\n') + '</table>'
.join('\n') + '</tbody></table>'
let searchField = document.createElement('input')
searchField.id = 'search-field'