Recognize archived threads on kissu.moe as threads.
This commit is contained in:
parent
ad042f29e4
commit
334f7e2a52
@ -23,7 +23,8 @@ class Post
|
|||||||
if not @isReply
|
if not @isReply
|
||||||
@thread.OP = @
|
@thread.OP = @
|
||||||
for key in ['isSticky', 'isClosed', 'isArchived']
|
for key in ['isSticky', 'isClosed', 'isArchived']
|
||||||
@thread[key] = if (selector = g.SITE.selectors.icons[key]) then !!$(selector, @nodes.info) else false
|
if (selector = g.SITE.selectors.icons[key])
|
||||||
|
@thread[key] = !!$(selector, @nodes.info)
|
||||||
if @thread.isArchived
|
if @thread.isArchived
|
||||||
@thread.isClosed = true
|
@thread.isClosed = true
|
||||||
@thread.kill()
|
@thread.kill()
|
||||||
|
|||||||
@ -145,6 +145,10 @@ Main =
|
|||||||
else if pathname[2] in ['thread', 'res']
|
else if pathname[2] in ['thread', 'res']
|
||||||
r.VIEW = 'thread'
|
r.VIEW = 'thread'
|
||||||
r.threadID = r.THREADID = +pathname[3].replace(/\.\w+$/, '')
|
r.threadID = r.THREADID = +pathname[3].replace(/\.\w+$/, '')
|
||||||
|
else if pathname[2] is 'archive' and pathname[3] is 'res'
|
||||||
|
r.VIEW = 'thread'
|
||||||
|
r.threadID = r.THREADID = +pathname[4].replace(/\.\w+$/, '')
|
||||||
|
r.threadArchived = true
|
||||||
else if /^(?:catalog|archive)(?:\.\w+)?$/.test(pathname[2])
|
else if /^(?:catalog|archive)(?:\.\w+)?$/.test(pathname[2])
|
||||||
r.VIEW = pathname[2].replace(/\.\w+$/, '')
|
r.VIEW = pathname[2].replace(/\.\w+$/, '')
|
||||||
else if /^(?:index|\d*)(?:\.\w+)?$/.test(pathname[2])
|
else if /^(?:index|\d*)(?:\.\w+)?$/.test(pathname[2])
|
||||||
@ -348,6 +352,7 @@ Main =
|
|||||||
Main.handleErrors errors if errors.length
|
Main.handleErrors errors if errors.length
|
||||||
|
|
||||||
if g.VIEW is 'thread'
|
if g.VIEW is 'thread'
|
||||||
|
threads[0].isArchived = true if g.threadArchived
|
||||||
g.SITE.parseThreadMetadata?(threads[0])
|
g.SITE.parseThreadMetadata?(threads[0])
|
||||||
|
|
||||||
Main.callbackNodes 'Thread', threads
|
Main.callbackNodes 'Thread', threads
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user