thread excerpts are default on 4chan; add Remove Thread Excerpt

This commit is contained in:
ccd0 2014-10-03 00:45:57 -07:00
parent fe74f5c5eb
commit b1cfa1b1e3
3 changed files with 16 additions and 2 deletions

View File

@ -277,7 +277,11 @@ Config =
]
'Thread Excerpt': [
true
'Show an excerpt of the thread in the tab title.'
'Show an excerpt of the thread in the tab title for threads in /f/.'
]
'Remove Thread Excerpt': [
false
'Replace the excerpt of the thread in the tab title with the board title.'
]
'Thread Stats': [
true

View File

@ -7,6 +7,9 @@ Banner =
banner = $ ".boardBanner"
{children} = banner
if g.BOARD.ID isnt 'f' and g.VIEW is 'thread' and Conf['Remove Thread Excerpt']
Banner.setTitle children[1].textContent
i = 0
while child = children[i++]
if i is 1
@ -24,6 +27,13 @@ Banner =
return
setTitle: (title) ->
if Unread.title?
Unread.title = title
Unread.update()
else
d.title = title
cb:
toggle: do ->
types =

View File

@ -1,6 +1,6 @@
ThreadExcerpt =
init: ->
return if g.VIEW isnt 'thread' or !Conf['Thread Excerpt']
return if g.BOARD.ID isnt 'f' or g.VIEW isnt 'thread' or !Conf['Thread Excerpt']
Thread.callbacks.push
name: 'Thread Excerpt'