Update Config and Quote Threading.

This commit is contained in:
Zixaphir 2013-04-21 22:37:30 -07:00
parent 4d25b6ff3a
commit e0dbc28e3c
10 changed files with 70 additions and 76 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -9,10 +9,6 @@ Config =
false
'Link to external catalog instead of the internal one.'
]
'Enable 4chan\'s Extension': [
false
'Compatibility between <%= meta.name %> and 4chan\'s inline extension is NOT guaranteed.'
]
'Custom Board Navigation': [
true
'Show custom links instead of the full board list.'

View File

@ -201,6 +201,9 @@ a[href="javascript:;"] {
#navtopright {
display: none;
}
#toggleMsgBtn {
display: none !important;
}
/* Notifications */
#notifications {
@ -487,8 +490,11 @@ a.hide-announcement {
/* Quote Threading */
.threadContainer {
margin-left: 20px;
border-left: 1px solid black;
border-left: 1px solid rgba(0,0,0,0.5);
}
.threadOP {
clear: both;
}
/* File */
.fileText:hover .fntrunc,

View File

@ -94,8 +94,4 @@ ExpandThread =
Main.callbackNodes Post, posts
$.after a, nodes
# Enable 4chan features.
if Conf['Enable 4chan\'s Extension']
$.globalEval "Parser.parseThread(#{thread.ID}, 1, #{nodes.length})"
else
Fourchan.parseThread thread.ID, 1, nodes.length
Fourchan.parseThread thread.ID, 1, nodes.length

View File

@ -289,10 +289,7 @@ ThreadUpdater =
# Enable 4chan features.
threadID = ThreadUpdater.thread.ID
{length} = $$ '.thread > .postContainer', ThreadUpdater.root
if Conf['Enable 4chan\'s Extension']
$.globalEval "Parser.parseThread(#{threadID}, #{-count})"
else
Fourchan.parseThread threadID, length - count, length
Fourchan.parseThread threadID, length - count, length
$.event 'ThreadUpdate',
404: false

View File

@ -62,20 +62,29 @@ QuoteThreading =
delete @threaded
delete @cb
return false if @thread.OP is qpost or (QuoteThreading.hasRun and !Unread.posts.contains qpost)
return false if @thread.OP is qpost
if QuoteThreading.hasRun
height = doc.clientHeight
{bottom, top} = qpost.nodes.root.getBoundingClientRect()
# Post is unread or is fully visible.
return false unless Unread.posts.contains(qpost) or ((bottom < height) and (top > 0))
qroot = qpost.nodes.root
threadContainer = qroot.nextSibling
if threadContainer?.className isnt 'threadContainer'
unless $.hasClass qroot, 'threadOP'
$.addClass qroot, 'threadOP'
threadContainer = $.el 'div',
className: 'threadContainer'
$.after qroot, threadContainer
else
threadContainer = qroot.nextSibling
$.add threadContainer, @nodes.root
return true
toggle: ->
thread = $ '.thread'
thread = $ '.thread'
replies = $$ '.thread > .replyContainer, .threadContainer > .replyContainer', thread
QuoteThreading.enabled = @checked
if @checked

View File

@ -35,7 +35,6 @@ Settings =
$.on d, 'AddSettingsSection', Settings.addSection
$.on d, 'OpenSettings', (e) -> Settings.open e.detail
return if Conf['Enable 4chan\'s Extension']
settings = JSON.parse(localStorage.getItem '4chan-settings') or {}
return if settings.disableAll
settings.disableAll = true