Update Config and Quote Threading.
This commit is contained in:
parent
4d25b6ff3a
commit
e0dbc28e3c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
builds/crx.crx
BIN
builds/crx.crx
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -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.'
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user