nginx-interactive-index: Only apply stripes to body
This commit is contained in:
parent
f6d9bf82db
commit
77eab2497a
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue