.js/lobste.rs.js

changeset 375
195bf106146f
child 397
466b95c31b1e
equal deleted inserted replaced
374:366c04327ad7 375:195bf106146f
1 // If story previews are enabled, set regular spacing and place byline below
2 // title.
3 if (document.querySelector('div.story_content')) {
4 var sheet = document.createElement('style')
5 sheet.innerHTML = "\
6 li.story { height: 7.5em; } \
7 li.story div.byline { color: #777; } \
8 li.story div.byline a { color: #777; } \
9 li.story div.story_content { color: #999; font-size: 95%; }"
10 document.body.appendChild(sheet)
11
12 var bylines = document.querySelectorAll('div.story_content + div.byline')
13 for (var e of bylines) {
14 e.parentNode.insertBefore(e, e.previousElementSibling)
15 }
16 }

mercurial