thread excerpts are default on 4chan; add Remove Thread Excerpt
This commit is contained in:
parent
fe74f5c5eb
commit
b1cfa1b1e3
@ -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
|
||||
|
||||
@ -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 =
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user