.js/lobste.rs.js

changeset 533
55a8ac65cd18
parent 510
809d4a3da079
equal deleted inserted replaced
532:210500a8d0f3 533:55a8ac65cd18
1 // If story previews are enabled, set regular spacing and place byline below 1 // If story previews are enabled, set regular spacing and place byline below
2 // title. 2 // title.
3 if (document.querySelector('div.story_content')) { 3 if (document.querySelector('div.story_content')) {
4 var sheet = document.createElement('style') 4 var sheet = document.createElement('style')
5 sheet.innerHTML = "\ 5 sheet.innerHTML = "\
6 ol.list li.story { height: 7.5em; } \ 6 ol.list li.story { height: 9em; } \
7 li.story div.byline { color: #777; } \ 7 li.story div.byline { color: #777; } \
8 li.story div.byline a { color: #777; } \ 8 li.story div.byline a { color: #777; } \
9 li.story div.story_content { color: #999; font-size: 95%; }" 9 li.story div.story_content { color: #999; font-size: 95%; max-height: 3em !important; }"
10 document.body.appendChild(sheet) 10 document.body.appendChild(sheet)
11 11
12 var bylines = document.querySelectorAll('div.story_content + div.byline') 12 var bylines = document.querySelectorAll('div.story_content + div.byline')
13 for (var e of bylines) { 13 for (var e of bylines) {
14 e.parentNode.insertBefore(e, e.previousElementSibling) 14 e.parentNode.insertBefore(e, e.previousElementSibling)

mercurial