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': [
|
'Thread Excerpt': [
|
||||||
true
|
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': [
|
'Thread Stats': [
|
||||||
true
|
true
|
||||||
|
|||||||
@ -7,6 +7,9 @@ Banner =
|
|||||||
banner = $ ".boardBanner"
|
banner = $ ".boardBanner"
|
||||||
{children} = banner
|
{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
|
i = 0
|
||||||
while child = children[i++]
|
while child = children[i++]
|
||||||
if i is 1
|
if i is 1
|
||||||
@ -24,6 +27,13 @@ Banner =
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
setTitle: (title) ->
|
||||||
|
if Unread.title?
|
||||||
|
Unread.title = title
|
||||||
|
Unread.update()
|
||||||
|
else
|
||||||
|
d.title = title
|
||||||
|
|
||||||
cb:
|
cb:
|
||||||
toggle: do ->
|
toggle: do ->
|
||||||
types =
|
types =
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
ThreadExcerpt =
|
ThreadExcerpt =
|
||||||
init: ->
|
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
|
Thread.callbacks.push
|
||||||
name: 'Thread Excerpt'
|
name: 'Thread Excerpt'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user