diff --git a/src/classes/Post.coffee b/src/classes/Post.coffee index 821130a0b..62065b65a 100644 --- a/src/classes/Post.coffee +++ b/src/classes/Post.coffee @@ -23,7 +23,8 @@ class Post if not @isReply @thread.OP = @ 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 @thread.isClosed = true @thread.kill() diff --git a/src/main/Main.coffee b/src/main/Main.coffee index 3e1de4492..53fad511a 100644 --- a/src/main/Main.coffee +++ b/src/main/Main.coffee @@ -145,6 +145,10 @@ Main = else if pathname[2] in ['thread', 'res'] r.VIEW = 'thread' 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]) r.VIEW = pathname[2].replace(/\.\w+$/, '') else if /^(?:index|\d*)(?:\.\w+)?$/.test(pathname[2]) @@ -348,6 +352,7 @@ Main = Main.handleErrors errors if errors.length if g.VIEW is 'thread' + threads[0].isArchived = true if g.threadArchived g.SITE.parseThreadMetadata?(threads[0]) Main.callbackNodes 'Thread', threads